mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Event: provide verbose comment for focus(in | out) & rename support prop
Closes gh-2312
This commit is contained in:
parent
61e21a4eaf
commit
c074006a69
16
src/event.js
16
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() {
|
||||
|
@ -2,7 +2,7 @@ define([
|
||||
"../var/support"
|
||||
], function( support ) {
|
||||
|
||||
support.focusinBubbles = "onfocusin" in window;
|
||||
support.focusin = "onfocusin" in window;
|
||||
|
||||
return support;
|
||||
|
||||
|
@ -62,7 +62,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -80,7 +80,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": false,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": true,
|
||||
"focusin": true,
|
||||
"noCloneChecked": false,
|
||||
"optDisabled": true,
|
||||
"optSelected": false,
|
||||
@ -98,7 +98,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": false,
|
||||
"cors": false,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": true,
|
||||
"focusin": true,
|
||||
"noCloneChecked": false,
|
||||
"optDisabled": true,
|
||||
"optSelected": false,
|
||||
@ -116,7 +116,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": false,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -134,7 +134,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -152,7 +152,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -170,7 +170,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": false,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -188,7 +188,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -206,7 +206,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
@ -224,7 +224,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"clearCloneStyle": false,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"focusin": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": false,
|
||||
"optSelected": true,
|
||||
|
Loading…
Reference in New Issue
Block a user