aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-05-13 01:15:19 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-05-19 13:43:34 +0300
commitc074006a69db73a116dc04ec78844468a8cea7d3 (patch)
tree65d63ab030781f4d502260cc9eaed62b524fb1cc /src
parent61e21a4eaf479406b660328f4df7e3183c32386b (diff)
downloadjquery-c074006a69db73a116dc04ec78844468a8cea7d3.tar.gz
jquery-c074006a69db73a116dc04ec78844468a8cea7d3.zip
Event: provide verbose comment for focus(in | out) & rename support prop
Closes gh-2312
Diffstat (limited to 'src')
-rw-r--r--src/event.js16
-rw-r--r--src/event/support.js2
2 files changed, 12 insertions, 6 deletions
diff --git a/src/event.js b/src/event.js
index 584ba9073..361a5489f 100644
--- a/src/event.js
+++ b/src/event.js
@@ -748,15 +748,21 @@ jQuery.each({
};
});
-// Support: Firefox, Chrome, Safari
-// Create "bubbling" focus and blur events
-if ( !support.focusinBubbles ) {
+// Support: Firefox
+// Firefox doesn't have focus(in | out) events
+// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+//
+// Support: Chrome, Safari
+// focus(in | out) events fire after focus & blur events,
+// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
+if ( !support.focusin ) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
// Attach a single capturing handler on the document while someone wants focusin/focusout
var handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
jQuery.event.special[ fix ] = {
setup: function() {
diff --git a/src/event/support.js b/src/event/support.js
index 85060db77..7ddca6a8d 100644
--- a/src/event/support.js
+++ b/src/event/support.js
@@ -2,7 +2,7 @@ define([
"../var/support"
], function( support ) {
-support.focusinBubbles = "onfocusin" in window;
+support.focusin = "onfocusin" in window;
return support;