diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 6dcb2e7..1fb2b8d 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -1744,18 +1744,21 @@ var Outline = { var elem = evt.target if(that.runPlugins('__keydown__', evt, that, evt.target) !== true){ return } - // update element state... - if(elem.classList.contains('code')){ - setTimeout(function(){ - that.update(elem.parentElement) - elem.updateSize() }, 0) } // handle keyboard... evt.key in that.keyboard && that.keyboard[evt.key].call(that, evt) }) // update code block... outline.addEventListener('keyup', function(evt){ - that.runPlugins('__keyup__', evt, that, evt.target) }) + var elem = evt.target + // update element state... + if(elem.classList.contains('code')){ + // NOTE: for some reason setting the timeout here to 0 + // makes FF sometimes not see the updated text... + setTimeout(function(){ + that.update(elem.parentElement) + elem.updateSize() }, 0) } + that.runPlugins('__keyup__', evt, that, elem) }) // toggle view/code of nodes... outline.addEventListener('focusin', diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index 9228e13..d7737be 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -46,7 +46,6 @@ var setup = function(){ - - ## Bugs: focused:: true - - BUG: editor: FF seems to update the style every other key press -- should be live... - BUG: mobile browsers behave quite chaotically ignoring parts of the styling... - - ## ToDo: @@ -109,6 +108,7 @@ var setup = function(){ block text - NOTE: this is only a problem if making list-items manually -- disable??? - empty item height is a bit off... + - search? - DONE over-travel pause -- when going fast over start/end stop... - DONE focus: collapsed:: true