Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8d9d417
)
check for visibility:hidden/collapsed too
author
Jason Woofenden
<jason@jasonwoof.com>
Sun, 13 Mar 2016 20:47:23 +0000
(16:47 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Sun, 13 Mar 2016 20:47:23 +0000
(16:47 -0400)
editor.coffee
patch
|
blob
|
history
diff --git
a/editor.coffee
b/editor.coffee
index
a2af4a5
..
66d1dfe
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-253,6
+253,10
@@
outer_css = (args) ->
ret += 'font-size: 8px;'
ret += 'white-space: pre;'
ret += 'background: rgba(255,255,255,0.4);'
ret += 'font-size: 8px;'
ret += 'white-space: pre;'
ret += 'background: rgba(255,255,255,0.4);'
+ ret += '-ms-user-select: none;'
+ ret += '-webkit-user-select: none;'
+ ret += '-moz-user-select: none;'
+ ret += 'user-select: none;'
ret += '}'
return ret
ret += '}'
return ret
@@
-858,12
+862,14
@@
class PeachHTML5Editor
display = cs['display']
position = cs['position']
float = cs['float']
display = cs['display']
position = cs['position']
float = cs['float']
+ visibility = cs['visibility']
else
cs = @iframe.contentWindow.getComputedStyle(n.el, null)
whitespace = cs.getPropertyValue 'white-space'
display = cs.getPropertyValue 'display'
position = cs.getPropertyValue 'position'
float = cs.getPropertyValue 'float'
else
cs = @iframe.contentWindow.getComputedStyle(n.el, null)
whitespace = cs.getPropertyValue 'white-space'
display = cs.getPropertyValue 'display'
position = cs.getPropertyValue 'position'
float = cs.getPropertyValue 'float'
+ visibility = cs.getPropertyValue 'visibility'
if n.name is 'textarea'
inner_flags.pre_ish = true
else
if n.name is 'textarea'
inner_flags.pre_ish = true
else
@@
-879,7
+885,11
@@
class PeachHTML5Editor
if 'display' is 'none'
in_flow = false
else
if 'display' is 'none'
in_flow = false
else
- in_flow = true
+ switch visibility
+ when 'hidden', 'collapse'
+ in_flow = false
+ else # visible
+ in_flow = true
switch display
when 'inline', 'none'
inner_flags.block = false
switch display
when 'inline', 'none'
inner_flags.block = false