Permalink
Browse files

Stop event propagation from the share component.

  • Loading branch information...
eelco committed Jul 28, 2016
1 parent 0d9f714 commit 04a5d8c43b9ec483b4f3e90040b24be26551ab17
Showing with 7 additions and 2 deletions.
  1. +7 −2 framer/Components/ShareComponent.coffee
@@ -95,9 +95,9 @@ class ShareComponent
truncate = (str, n) ->
str.substr(0, n-1).trim() + "…"
if @shareInfo.twitter and @shareInfo.title.length > 26
if @shareInfo.twitter and @shareInfo.title?.length > 26
@shareInfo.title = truncate(@shareInfo.title, 26)
else if @shareInfo.title.length > 34
else if @shareInfo.title?.length > 34
@shareInfo.title = truncate(@shareInfo.title, 34)
# Render main sheet
@@ -489,6 +489,11 @@ class ShareComponent
@style =
cursor: "default"
# Disable events propagating up to block unintented interactions
@sheet.onTouchStart (event) -> event.stopPropagation()
@sheet.onTouchEnd (event) -> event.stopPropagation()
@sheet.onTouchMove (event) -> event.stopPropagation()
# Toggle sheet when clicked on close or open buttons
@close.onClick =>
@options.fixed = true

0 comments on commit 04a5d8c

Please sign in to comment.