bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-10-26 23:05:16 +03:00
parent 37fd871d68
commit e52062b994
2 changed files with 16 additions and 7 deletions

View File

@ -1518,12 +1518,25 @@ var Outline = {
place = place == 'prev' ?
'before'
: place
// ... ...
// cur cur
// new new <- before the next after cur
// --- ---
// ... ...
;(place == 'next'
&& (cur.querySelector('.block')
|| cur !== this.get(-1))) ?
// has children (uncollapsed)...
&& (cur.querySelector('.block')?.offsetParent
// not last sibling...
|| cur !== this.get('siblings').at(-1))) ?
this.get(place).before(block)
// ...
// ---
// cur
// new <- next after cur
// ...
: (place == 'next'
&& cur === this.get(-1)) ?
// last sibling...
&& cur === this.get('siblings').at(-1)) ?
cur.after(block)
: (place == 'before' || place == 'after') ?
cur[place](block)

View File

@ -48,10 +48,6 @@ var setup = function(){
-
- ## Bugs:
focused:: true
- BUG: adding a new node after a last node on a level adds it to wrong level
- demo:
- a
- add node after this
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
-
- ## ToDo: