@@ -78,32 +78,34 @@ export component TextEdit {
78
78
in property <string > placeholder-text ;
79
79
80
80
callback edited (/* text */ string );
81
+ callback rejected (/* text */ string );
82
+
81
83
accessible-role : AccessibleRole.text-input;
82
84
accessible-enabled : root .enabled;
83
85
accessible-value <=> text;
84
86
accessible-placeholder-text : text == "" ? placeholder-text : "" ;
85
87
86
- public function set-selection-offsets (start : int ,end : int ){
88
+ public function set-selection-offsets (start : int , end : int ) {
87
89
text-input.set-selection-offsets (start, end);
88
90
}
89
91
90
- public function select-all (){
92
+ public function select-all () {
91
93
text-input.select-all ();
92
94
}
93
95
94
- public function clear-selection (){
96
+ public function clear-selection () {
95
97
text-input.clear-selection ();
96
98
}
97
99
98
- public function cut (){
100
+ public function cut () {
99
101
text-input.cut ();
100
102
}
101
103
102
- public function copy (){
104
+ public function copy () {
103
105
text-input.copy ();
104
106
}
105
107
106
- public function paste (){
108
+ public function paste () {
107
109
text-input.paste ();
108
110
}
109
111
@@ -157,6 +159,10 @@ export component TextEdit {
157
159
root .edited (self .text);
158
160
}
159
161
162
+ rejected => {
163
+ root .rejected (self .text);
164
+ }
165
+
160
166
cursor-position-changed (cpos) => {
161
167
if (cpos.x + root .viewport-x < 12px ) {
162
168
root .viewport-x = min (0px , max(parent .visible-width - self .width, - cpos.x + 12px ));
0 commit comments