diff --git a/src/plugins/Modal.js b/src/plugins/Modal.js index 006200760..964e19d53 100644 --- a/src/plugins/Modal.js +++ b/src/plugins/Modal.js @@ -30,15 +30,6 @@ export default class Modal extends Plugin { this.showModal = this.showModal.bind(this) } - update (state) { - if (typeof this.el === 'undefined') { - return - } - - const newEl = this.render(this.core.state) - yo.update(this.el, newEl) - } - addTarget (callerPlugin, render) { const callerPluginId = callerPlugin.constructor.name const callerPluginName = callerPlugin.name || callerPluginId @@ -58,7 +49,6 @@ export default class Modal extends Plugin { name: callerPluginName, icon: callerPluginIcon, type: callerPluginType, - // el: el, render: render, isHidden: true } @@ -143,7 +133,10 @@ export default class Modal extends Plugin { }) }) + // add class to body that sets position fixed document.body.classList.add('is-UppyModal-open') + // focus on modal inner block + document.querySelector('*[tabindex="0"]').focus() } events () { @@ -183,16 +176,11 @@ export default class Modal extends Plugin { return yo`