fix: overlaypanel only be closed on escape key pressed
#4712 https://github.com/primefaces/primevue/issues/4712pull/4713/head
parent
2d4b5544a3
commit
851103fac9
|
@ -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');
|
||||
|
@ -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