Skip to content

Commit

Permalink
add IE fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
estevanmaito committed May 18, 2019
1 parent 39b3269 commit f8953bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/sharect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/helpers/isSelectableElement.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import getClosestElement from "./getClosestElement";

export default function isSelectableElement(selectableElements) {
let currentSelectedElement = window.getSelection().baseNode.parentNode
const baseNode = window.getSelection().baseNode || window.getSelection().anchorNode
let currentSelectedElement = baseNode.parentNode
return selectableElements.some(ancestor =>
getClosestElement(currentSelectedElement, ancestor)
)
Expand Down

0 comments on commit f8953bc

Please sign in to comment.