mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-07-30 19:30:22 +02:00
polyfill element.closest for ie11
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { closest } from '../utils/util.js'
|
||||
|
||||
/**
|
||||
* Manages focus when a presentation is embedded. This
|
||||
* helps us only capture keyboard from the presentation
|
||||
@@ -85,7 +87,7 @@ export default class Focus {
|
||||
|
||||
onDocumentPointerDown( event ) {
|
||||
|
||||
let revealElement = event.target.closest( '.reveal' );
|
||||
let revealElement = closest( event.target, '.reveal' );
|
||||
if( !revealElement || revealElement !== this.Reveal.getRevealElement() ) {
|
||||
this.blur();
|
||||
}
|
||||
|
Reference in New Issue
Block a user