Open dazusu opened 4 years ago
Since Chrome 73, if a user attempts to start selecting text with the mouse in an input, then "mouseup"'s outside of the input, onblur submit is triggered.
This doesn't happen in other browsers, and is only present in Chrome 73+.
Video: https://recordit.co/DExC3xBfmU
I came up with the following workaround. Set onblur: 'ignore' and handle the blur as follows:
onblur: 'ignore'
$('body').on('blur',` '.editable-input input', function () { $(this).closest('form').submit(); });
Since Chrome 73, if a user attempts to start selecting text with the mouse in an input, then "mouseup"'s outside of the input, onblur submit is triggered.
This doesn't happen in other browsers, and is only present in Chrome 73+.
Video: https://recordit.co/DExC3xBfmU