Ver Fonte

Menu:fix subMenu focus bug when switch browser tab (#13976)

* Menu:fix subMenu focus bug

* Menu:fix subMenu focus bug remove window.ActiveXObject
刘鹏龙 há 6 anos atrás
pai
commit
1ec0821e42
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      packages/menu/src/submenu.vue

+ 4 - 1
packages/menu/src/submenu.vue

@@ -178,7 +178,10 @@
         }
         this.dispatch('ElMenu', 'submenu-click', this);
       },
-      handleMouseenter() {
+      handleMouseenter(event) {
+        if (!('ActiveXObject' in window) && event.type === 'focus' && !event.relatedTarget) {
+          return;
+        }
         const { rootMenu, disabled } = this;
         if (
           (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal') ||