Merge pull request #4713 from kadirboylu/master
Fix #4712 Overlaypanel: Overlaypanel closes when any key is pressedpull/4806/head
commit
6f342ad243
|
@ -139,6 +139,7 @@ export default {
|
|||
this.unbindOutsideClickListener();
|
||||
this.unbindScrollListener();
|
||||
this.unbindResizeListener();
|
||||
this.unbindDocumentKeyDownListener();
|
||||
OverlayEventBus.off('overlay-click', this.overlayEventListener);
|
||||
this.overlayEventListener = null;
|
||||
this.$emit('hide');
|
||||
|
@ -167,7 +168,7 @@ export default {
|
|||
}
|
||||
},
|
||||
onContentKeydown(event) {
|
||||
if (event.code === 'Escape') {
|
||||
if (event.code === 'Escape' && this.closeOnEscape) {
|
||||
this.hide();
|
||||
DomHandler.focus(this.target);
|
||||
}
|
||||
|
@ -192,7 +193,7 @@ export default {
|
|||
}
|
||||
},
|
||||
onKeyDown(event) {
|
||||
if (event.code === 'Escape' || this.closeOnEscape) {
|
||||
if (event.code === 'Escape' && this.closeOnEscape) {
|
||||
this.visible = false;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue