Add supoprt for modal dimmer element (#971)
This commit is contained in:
parent
327d7b1f26
commit
f5d6573bec
@ -117,9 +117,11 @@ class Modal extends PopupElement {
|
|||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
const node = this._node;
|
const node = this._node;
|
||||||
node.addEventListener('mousedown', this._onModalContainerMouseDown.bind(this), false);
|
let dimmerNode = node.querySelector('.modal-content-dimmer');
|
||||||
node.addEventListener('mouseup', this._onModalContainerMouseUp.bind(this), false);
|
if (dimmerNode === null) { dimmerNode = node; }
|
||||||
node.addEventListener('click', this._onModalContainerClick.bind(this), false);
|
dimmerNode.addEventListener('mousedown', this._onModalContainerMouseDown.bind(this), false);
|
||||||
|
dimmerNode.addEventListener('mouseup', this._onModalContainerMouseUp.bind(this), false);
|
||||||
|
dimmerNode.addEventListener('click', this._onModalContainerClick.bind(this), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private
|
// Private
|
||||||
|
Loading…
Reference in New Issue
Block a user