jQuery MS Edge: trigger('blur') keeps focus for arrow, backspace and delete

Viewed 371

I've encountered some strange behaviour with text inputs in MS Edge when triggering a 'blur' event. When doing so, there still seems to be some focus that allows backspace, delete and arrowkeys to work; all other keys have no effect until I actually focus again by clicking or trigger a js 'focus' event.

At work some workstations actually still show a blinking cursor after triggering the 'blur' event. In my case it only appears after using the DEL or BACKSPACE key, eventhough other keys won't have any effect.

I can think of a workaround to set/unset my own data-attribute to keep track of focus/blur on the specific element and simply disallow any input when there is no focus ... though I don't even know if I can prevent this user input at all in Edge.

Anyone with similair problems?

Here is a "working" example (open in Edge obviously):

http://jsfiddle.net/se82Ljhr/

Try backspace and right after that; try typing again.<br />
<br />

<input type="text" id="postalcode" name="postalcode" placeholder="1234AB" 
value="Try BACKSPACE" />
0 Answers
Related