mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
fix(event-handler): remove polyfill and move it to index
This commit is contained in:
parent
fe580a8e5a
commit
b4a3b00ac8
@ -307,18 +307,4 @@ const EventHandler = (() => {
|
|||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
|
||||||
// focusin and focusout polyfill
|
|
||||||
if (Polyfill.focusIn) {
|
|
||||||
(() => {
|
|
||||||
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
|
export default EventHandler
|
||||||
|
@ -3,7 +3,9 @@ import Button from './button'
|
|||||||
import Carousel from './carousel'
|
import Carousel from './carousel'
|
||||||
import Collapse from './collapse'
|
import Collapse from './collapse'
|
||||||
import Dropdown from './dropdown'
|
import Dropdown from './dropdown'
|
||||||
|
import EventHandler from './dom/eventHandler'
|
||||||
import Modal from './modal'
|
import Modal from './modal'
|
||||||
|
import Polyfill from './dom/polyfill'
|
||||||
import Popover from './popover'
|
import Popover from './popover'
|
||||||
import ScrollSpy from './scrollspy'
|
import ScrollSpy from './scrollspy'
|
||||||
import Tab from './tab'
|
import Tab from './tab'
|
||||||
@ -18,6 +20,21 @@ import Util from './util'
|
|||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* istanbul ignore next */
|
||||||
|
// focusin and focusout polyfill
|
||||||
|
if (Polyfill.focusIn) {
|
||||||
|
(() => {
|
||||||
|
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 {
|
export {
|
||||||
Util,
|
Util,
|
||||||
Alert,
|
Alert,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user