1

Here is the fiddle

After alert fires popup box we click on "OK" button and if we start moving our mouse up or down without clicking it starts to selecting text like as if we have been pressing button on a mouse to select text. Looks like I have this behavior only in Firefox.

How can I disable it?

Here is the js code:

$('#test').on('blur', function() {
  alert('test');
})

Tried on Mac and Windows - getting the same behavior.

Mac's Firefox ver. 43.0.4 Window's Firefox ver. 41.0.2

whitesiroi
  • 2,725
  • 4
  • 30
  • 64
  • 1
    http://stackoverflow.com/questions/23432592/javascript-firefox-behavior-blur-by-mouse-click-bug – guest Jan 23 '16 at 11:30
  • @guest Thank you for your comment(link), very helpful. I did read it and yes, it's a bug that was reported in 2010 :) https://bugzilla.mozilla.org/show_bug.cgi?id=53579 that haven't been fixed yet :) – whitesiroi Jan 23 '16 at 13:12

1 Answers1

0

Thanks to @guest's comment the answer was found.

As Greg Burghardt answered in this question Javascript - Firefox behavior blur by mouse click. Bug?

<input ... onblur="setTimeout(function() { alert(...); }, 0);">

does work.

And the link to the bug https://bugzilla.mozilla.org/show_bug.cgi?id=53579 that was posted in 2000.

Community
  • 1
  • 1
whitesiroi
  • 2,725
  • 4
  • 30
  • 64