1
0
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:
Hakim El Hattab
2020-05-26 10:45:05 +02:00
parent e6244a57b5
commit b7487b8b4f
10 changed files with 45 additions and 34 deletions

View File

@@ -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();
}