Uh oh!
There was an error while loading. Please reload this page.
Fix/toc without transaction - #5893
Conversation
443d9f3 to
53ae9d7Compare| .setTextSelection(heading.position) | ||
| .scrollIntoView() | ||
| .run() | ||
| document.getElementById(heading.id).scrollIntoView() |
There was a problem hiding this comment.
This is slightly different from what we used to do. In particular we do not set the cursor anymore.
We could also use the old way replacing heading.position with heading.offset + 1. I changed it as relying on the id seemed more robust to me than the offset at that time - but both should be fine now as we recompute and update the offset whenever the doc changes.
juliusknorr
commented
Jun 13, 2024
Very nice, unfortunately this does not seem to fix the initial update step stent for read only sessions. |
juliusknorr
commented
Jun 13, 2024
juliusknorr
commented
Jun 13, 2024
Additional backend attempt at #5895 |
max-nextcloud
commented
Jun 13, 2024
Yes... that's exactly what I wondered this morning - whether the toc transaction was really the cause. Thanks for coming up with the backend fix. I'll take a look at it. |
max-nextcloud
commented
Jun 13, 2024
Since this does not fix the 403s fully, there's no rush to get it into todays RC anymore. I'll fix the tests and see if it fixes nextcloud/collectives#1114 . |
e78caba to
6015463Compare
This comment was marked as resolved.
This comment was marked as resolved.
max-nextcloud
commented
Jun 18, 2024
I figured it out. By default decorations are put behind the cursor in the given position. Adding a |
f3a233d to
da1b008Compare8d3502e to
0594780Compare0594780 to
81bae7bCompareSigned-off-by: Max <max@nextcloud.com>
This avoids transactions that actually change the document state. Fixes#5861. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
This will trigger an update event on the editor which in turn will trigger all update handlers. Avoid this when not necessary. Signed-off-by: Max <max@nextcloud.com>
This allows typing even at the beginning of the heading as the cursor now is between the anchor and the first letter. Signed-off-by: Max <max@nextcloud.com>
The toc does not trigger a transaction anymore and therefore there is no push to wait for either. Also use cypress aliases and avoid deep nesting of cypress calls when possible. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
81bae7b to
ea2e93dComparemejo-
commented
Jul 25, 2024
/backport to stable29 |
mejo-
commented
Jul 25, 2024
/backport to stable28 |
When the whole document gets replaced by the same content, `DecorationSet.map()` returns an empty decorationSet. So only use it for updates where no decorations get removed. Signed-off-by: Jonas <jonas@freesources.org>
ea2e93d to
e0d10b2Compare
📝 Summary
🚧 TODO
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)