Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
c5595e5b
Commit
c5595e5b
authored
7 years ago
by
Johann-S
Committed by
XhmikosR
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Add polyfill for focusin and focusout
parent
aba87279
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/src/dom/eventHandler.js
+15
-1
js/src/dom/eventHandler.js
with
15 additions
and
1 deletion
+15
-1
js/src/dom/eventHandler.js
+
15
-
1
View file @
c5595e5b
...
...
@@ -133,7 +133,7 @@ const EventHandler = {
const
fn
=
!
delegation
?
bootstrapHandler
(
element
,
handler
)
:
bootstrapDelegationHandler
(
handler
,
delegationFn
)
handlers
[
uid
]
=
fn
originalHandler
.
uidEvent
=
uid
element
.
addEventListener
(
typeEvent
,
fn
,
false
)
element
.
addEventListener
(
typeEvent
,
fn
,
delegation
)
},
one
(
element
,
event
,
handler
)
{
...
...
@@ -193,4 +193,18 @@ const EventHandler = {
}
}
// focusin and focusout polyfill
if
(
typeof
window
.
onfocusin
===
'
undefined
'
)
{
(()
=>
{
function
listenerFocus
(
event
)
{
EventHandler
.
trigger
(
event
.
target
,
'
focusin
'
)
}
function
listenerBlur
(
event
)
{
EventHandler
.
trigger
(
event
.
target
,
'
focusout
'
)
}
EventHandler
.
on
(
document
,
'
focus
'
,
'
input
'
,
listenerFocus
)
EventHandler
.
on
(
document
,
'
blur
'
,
'
input
'
,
listenerBlur
)
})()
}
export
default
EventHandler
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment