Is there an event that is fired when the text inside an <input>
-tag is scrolled? I mean when the text inside is to long and you move the input caret to the end of it, etc.
There is a scroll
event you can catch on the element when that is scrolled in the layout, but that is not what I want.
UPDATE: Here is a fiddle to test the events discussed: http://jsfiddle.net/lborgman/L8k5ggnk/3/
There is no specific event for this that will work across browsers. Firefox does fire a scroll
event when the text "scrolls" by changing the insertion point, but Chrome and likely other browsers don't.
Here is a list of events that could change the insertion point.
input
keydown
keyup
focus
blur
click
change
paste
cut
scroll
wheel
dragover
Binding an event listener to all of these should be enough to respond to the insertion point changing. I believe the list above is complete, but if I have missed any, let me know!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With