Skip to content

Commit

Permalink
feat(panel): open links in new tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Jul 26, 2018
1 parent 6a28e3d commit d40cf2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content/components/DictItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export class DictItem extends React.PureComponent<DictItemProps & { t: Translati
}

handleDictItemClick = (e: React.MouseEvent<HTMLElement>) => {
if (e.ctrlKey || e.metaKey || e.altKey) { return }

// use background script to open new page
const $target = e.target as HTMLElement
if (!$target.tagName || !$target.parentElement) { return }
Expand Down

0 comments on commit d40cf2a

Please sign in to comment.