Index: trunk/extensions/VisualEditor/demos/playground/flip.html |
— | — | @@ -25,10 +25,14 @@ |
26 | 26 | $('#editor').attr('contenteditable', true); |
27 | 27 | }) |
28 | 28 | .focus(function() { |
29 | | - console.log('thumbnail has focus. this probably shouldn't happen.'); |
| 29 | + console.log('thumbnail has focus. this probably should not happen.'); |
30 | 30 | }); |
31 | 31 | $('#editor').click(function() { |
32 | | - if ($(rangy.getSelection().anchorNode).closest('[contenteditable="false"]').length) { |
| 32 | + var node = rangy.getSelection().anchorNode; |
| 33 | + while (node.nodeType === 3) { |
| 34 | + node = node.parentNode; |
| 35 | + } |
| 36 | + if (!node.isContentEditable) { |
33 | 37 | console.log('cursor is in the wrong place. fix it!'); |
34 | 38 | } |
35 | 39 | }); |
— | — | @@ -36,6 +40,7 @@ |
37 | 41 | </script> |
38 | 42 | <style> |
39 | 43 | [contenteditable="true"] { |
| 44 | + cursor: text; |
40 | 45 | outline: 0; |
41 | 46 | } |
42 | 47 | #editor { |
— | — | @@ -101,15 +106,7 @@ |
102 | 107 | THUMB |
103 | 108 | <p contenteditable="true">this is the caption</p> |
104 | 109 | </div> |
105 | | - |
106 | | - <p>This week, I was seeing a drop in average back-end performance at work, we had an average drop in page load performance from ~250ms to around 500ms. This seemed to be an intermittent problem and we searched through out graphs at NewRelic with no clear culprit.</p> |
107 | 110 | |
108 | | - <p>I’ve worked at several environments where most of our product was run through the JVM. I’ve always used the information available to me in Mbeans, but the overhead of exposing them to a monitoring system like Ganglia or Nagios has always been problematic.</p> |
109 | | - |
110 | | - <p>This week, I was seeing a drop in average back-end performance at work, we had an average drop in page load performance from ~250ms to around 500ms. This seemed to be an intermittent problem and we searched through out graphs at NewRelic with no clear culprit.</p> |
111 | | - |
112 | | - <p>I’ve worked at several environments where most of our product was run through the JVM. I’ve always used the information available to me in Mbeans, but the overhead of exposing them to a monitoring system like Ganglia or Nagios has always been problematic.</p> |
113 | | - |
114 | 111 | </div> |
115 | 112 | </body> |
116 | 113 | </html> |
\ No newline at end of file |