You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/4-forms-controls/3-events-change-input/article.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ For other elements: `select`, `input type=checkbox/radio` it triggers right afte
21
21
22
22
The `input` event triggers every time a value is modified.
23
23
24
+
Unlike keyboard events, it triggers on any value change, even those that does not involve keyboard actions: pasting with a mouse or using speech recognition to dictate the text.
25
+
24
26
For instance:
25
27
26
28
```html autorun height=40 run
@@ -34,7 +36,7 @@ For instance:
34
36
35
37
If we want to handle every modification of an `<input>` then this event is the best choice.
36
38
37
-
Unlike keyboard events it works on any value change, even those that does not involve keyboard actions: pasting with a mouse or using speech recognition to dictate the text.
39
+
On the other hand, `input` event doesn't trigger on keyboard input and other actions that do not involve value change, e.g. pressing arrow keys `key:⇦``key:⇨` while in the input.
38
40
39
41
```smart header="Can't prevent anything in `oninput`"
40
42
The `input` event occurs after the value is modified.
0 commit comments