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' ? place = place == 'prev' ?
'before' 'before'
: place : place
// ... ...
// cur cur
// new new <- before the next after cur
// --- ---
// ... ...
;(place == 'next' ;(place == 'next'
&& (cur.querySelector('.block') // has children (uncollapsed)...
|| cur !== this.get(-1))) ? && (cur.querySelector('.block')?.offsetParent
// not last sibling...
|| cur !== this.get('siblings').at(-1))) ?
this.get(place).before(block) this.get(place).before(block)
// ...
// ---
// cur
// new <- next after cur
// ...
: (place == 'next' : (place == 'next'
&& cur === this.get(-1)) ? // last sibling...
&& cur === this.get('siblings').at(-1)) ?
cur.after(block) cur.after(block)
: (place == 'before' || place == 'after') ? : (place == 'before' || place == 'after') ?
cur[place](block) cur[place](block)

View File

@ -48,10 +48,6 @@ var setup = function(){
- -
- ## Bugs: - ## Bugs:
focused:: true 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... - BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
- -
- ## ToDo: - ## ToDo: