diff options
Diffstat (limited to 'js/components')
-rw-r--r-- | js/components/hintable.reel/hintable.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index cbfe2d9b..6e3b2aaf 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js | |||
@@ -157,6 +157,14 @@ exports.Hintable = Montage.create(Editable, { | |||
157 | 157 | ||
158 | this._super(arguments); | 158 | this._super(arguments); |
159 | 159 | ||
160 | /// Remove the phantom "<BR>" element that is generated when | ||
161 | /// content editable element is empty | ||
162 | this._children(this._element, function(item) { | ||
163 | return item.nodeName === 'BR'; | ||
164 | }).forEach(function(item) { | ||
165 | this._element.removeChild(item); | ||
166 | }, this); | ||
167 | |||
160 | if(k === 39) { | 168 | if(k === 39) { |
161 | selection = window.getSelection(); | 169 | selection = window.getSelection(); |
162 | text = selection.baseNode.textContent; | 170 | text = selection.baseNode.textContent; |