-
-
Notifications
You must be signed in to change notification settings - Fork 898
Description
Describe the bug
When adding a heading formatting to a Slate field (Richtext, etc.) inside a CT field, when clicking on the text to move the cursor or when trying to highlight text with the mouse does not work properly.
The selection gets stuck and does not change when selecting different words after doing it the first time. Also, if the user clicks on another part of the text to deselect the previous selection or to place the cursor, it won't move to the selected position.
This has been reported for Volto 17.
As of now, it is not possible to test it on Volto 18 as it is not possible to add headings to a RichText field inside a CT because of this issue: #7889
However, the code for Slate has not changed for this issue across versions so it's supposedly still there.
To Reproduce
Steps to reproduce the behavior:
- Go to https://demo.plone.org/
- Login and go to https://demo.plone.org/controlpanel/dexterity-types
- Create a custom CT for demo
- Click on the Actions menu
- Click on schema
- Add a "Richtext" type of field
- Create a new CT of the newly created type
- Add text to the Richtext field
- Select the text and click on the "Headings" buttons
- Try and select the heading text or move the cursor with your mouse.
Expected behavior
The selection should work seamlessly as it does on any other editor. By pointing and dragging the mouse, the selected text should be corresponding with the initial and final position of the mouse every time the user repeats this type of action. If text is selected and the user clicks on another position with the mouse once, the selection should be canceled and the cursor should move to the position where the click happened.
(volto 17)
Software (please complete the following information):
- OS: MacOS
- Browser: Chrome
- Volto Version: 17.x.x, 18.x.x (supposedly)
- Plone Version: 6.x.x
- Plone REST API Version: 9.15.x
