Skip to content

Commit c25c249

Browse files
committed
Modified src/index.js
1 parent 30aa52a commit c25c249

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ export default class Trigger extends React.Component {
126126

127127
if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {
128128
this.clickOutsideHandler = listen(currentDocument,
129-
'mousedown', this.onDocumentClick);
129+
'mousedown', (e) => {
130+
//修复在Edge下如果点击Trigger并由上层组件隐藏Popup时,导致mouseup无法触发从而导致文字选择的BUG...
131+
//不在Trigger里修复,这部分需要由上层组件通过setTimeout方式延迟隐藏的方式来规避
132+
//e.preventDefault();
133+
this.onDocumentClick(e);
134+
});
130135
}
131136

132137
if (!this.touchOutsideHandler && isMobile) {

0 commit comments

Comments
 (0)