Closed RomanWu closed 1 year ago
I can reproduce the issue with Kirby 3.8.3 - though not always. Haven't spotted any pattern, seems to be quite randomly when it appears and when not (though it appears in a lot, 40-50% of the attempts).
I can always reproduce it in Kirby 3.8.3. The Writer field needs to be in a Layout. Then you need to open the Popup/Drawer by clicking the pencil. And if you then delete a word mid sentence (by way of multiple presses of the backspace key), then as soon as the word is gone, the cursor jumps to the end. Also, at the same moment, two consecutive space characters, that would have remained, are corrected to just one space. I have this behaviour in multiple browsers and consistently all the time.
The issue is most clear, when one tries to delete multiple words mid sentence. After the first word, the cursor jumps to the end.
I can reproduce the issue in Kirby 3.9.2.
I can reproduce the issue in combination with using markup signs (3.9.2). When I add a * somewhere in the middle of the text it will jump to the end. I see this happen in the notes from the starter kit. And also in blocks I added in my own site on the basis of this blocks cookbook page.
In this last instance I have the problem in the inline editing of a block and also in the open the Popup/Drawer.
I have tried to solve my issue: first I installed previous versions of Kirby, but no change. So I changed the code.
changed the preview to not-editable
In the plugins/block-factory/index.js
where the preview and editing of the blocks is described, I swapped the
thanks, René
This seems to be solved in Kirby 4 (layout field > text block > open drawer > type sentence > delete word in the middle of the sentence > cursor doesn't jump).
Please let me know if you can still reproduce it.
Description
When writing in a Writer field, going back in the text and deleting a word results in the cursor jumping to the end of the text. This happens only, when the field is used in a Layout and is opened in the popup/drawer by way of clicking on the pencil icon.
Expected behavior
The cursor should stay at the position, where the text is beeing edited.
To reproduce
The cursor will jump to the end of the text, when all the characters of the word are deleted. (It seems to me possibly connected to the replacement of the two consecutive Space characters.)
This does not happen, when the text is edited directly in the Layout.
Screenshot
Your setup
Kirby Version
Kirby 3.8.0 Kirby 3.7.3
Your system (please complete the following information) Safari 15.6 MacOS Chrome 106 MacOS Firefox 105 MacOS