Skip to content

Commit

Permalink
fix(popup): issues-935 弹出层消失问题
Browse files Browse the repository at this point in the history
鼠标移到弹出层外松开,弹出层不消失

fix #935
  • Loading branch information
geff1991 committed Dec 23, 2021
1 parent 54bca58 commit 983b3d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/popup/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default Vue.extend({
if (val) {
this.updatePopper();
if (!this.hasDocumentEvent && (this.hasTrigger['context-menu'] || this.hasTrigger.click)) {
on(document, 'click', this.handleDocumentClick);
on(document, 'mousedown', this.handleDocumentClick);
this.hasDocumentEvent = true;
}
// focus trigger esc 隐藏浮层
Expand All @@ -107,7 +107,7 @@ export default Vue.extend({
}
} else {
// destruction is delayed until after animation ends
off(document, 'click', this.handleDocumentClick);
off(document, 'mousedown', this.handleDocumentClick);
this.hasDocumentEvent = false;
}
},
Expand Down

0 comments on commit 983b3d9

Please sign in to comment.