Dialog: fix nested popover cannot gain focus

pull/5241/merge
Leopoldthecoder 2017-06-13 12:25:40 +08:00 committed by 杨奕
parent ba9a5d5ae3
commit 3883ab3427
2 changed files with 1 additions and 11 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<transition name="dialog-fade"> <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 <div
class="el-dialog" class="el-dialog"
:class="[sizeClass, customClass]" :class="[sizeClass, customClass]"

View File

@ -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; export default PopupManager;