diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index 043980c..384a53c 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -180,6 +180,8 @@ &>.code { position: absolute; top: 0; + /* XXX this is not correct -- it expands the code to cover + the whole element incl. children... */ height: 100%; /*height: calc(2 * var(--item-padding) + 1em);*/ overflow: hidden; @@ -283,6 +285,10 @@ &[collapsed]>.view:after { content: "●"; } + + &>.children { + position: relative; + } } /* block hover... */ diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 5faac8d..20a31fe 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -2411,6 +2411,11 @@ var Outline = { outline.addEventListener('mousedown', function(evt){ var elem = evt.target + // prevent clicking through children to parent elements... + if(elem.classList.contains('children')){ + evt.preventDefault() + outline.focus() + return } // place the cursor where the user clicked in code/text... if(elem.classList.contains('code') && document.activeElement !== elem){ diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index 4ec5d61..7f30e1d 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -117,13 +117,13 @@ var setup = function(){ - side margins are a bit too large - still need to account for toolbar to the right - left side does not need to be as wide + - BUG? `.code` is currently over-extended and covers the whole element area (incl. `.children`) + - this currently has no side-effects but is not pretty (???) - - ## ToDo: - add loading spinner -- `.loading` class set on `.load(..)` and unset when done... - DONE set/unset class - add animation - - clicking left of the block can select one of parent blocks -- bug or feature?? - - _can we extend the left click zone all the way to the left edge???_ - `.json(..)`, `.data(..)`, ... should be signature compatible with `.get(..)` (???) - _current state causes constant confusion..._ - Time to think about a standalone client -- at least to edit own notes as a test...