Skip to content

Commit

Permalink
fix(panel): blur input on drag start
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed May 15, 2018
1 parent 14437ef commit 1759053
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/content/components/DictPanelPortal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export default class DictPanelPortal extends React.Component<DictPanelPortalProp
}

handleDragStart = (e: React.MouseEvent<HTMLDivElement>) => {
// prevent mousedown dragging
const activeElement = document.activeElement as any
if (activeElement) { activeElement.blur() }
// prevent mousedown default dragging
e.preventDefault()
e.stopPropagation()
// e is from iframe, so there is offset
Expand Down

0 comments on commit 1759053

Please sign in to comment.