mirror of https://github.com/ElemeFE/element
Dialog: fix nested popover cannot gain focus
parent
ba9a5d5ae3
commit
3883ab3427
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<transition name="dialog-fade">
|
||||
<div class="el-dialog__wrapper" tabindex="-1" v-show="visible" @click.self="handleWrapperClick">
|
||||
<div class="el-dialog__wrapper" v-show="visible" @click.self="handleWrapperClick">
|
||||
<div
|
||||
class="el-dialog"
|
||||
:class="[sizeClass, customClass]"
|
||||
|
|
|
@ -174,16 +174,6 @@ if (!Vue.prototype.$isServer) {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// keep focusing inside the popup by `tab` key
|
||||
document.addEventListener('focusin', function(event) {
|
||||
const topPopup = getTopPopup();
|
||||
|
||||
if (topPopup && !topPopup.$el.contains(event.target)) {
|
||||
event.stopPropagation();
|
||||
topPopup.$el.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default PopupManager;
|
||||
|
|
Loading…
Reference in New Issue