"Add above" feature does not work with keyboard

Created on 10 May 2023, over 1 year ago
Updated 7 August 2024, 5 months ago

Nothing happens if you try to press the "Add above" button using keyboard. If you have CSP module enabled, the form submits when you press "Add above" and a violation is reported unless unsafe-inline script-src is allowed. The reason for this is that the button uses onclick handler to disable click and mousedown event for clickHandler. Using click event for clickHandler fixes both problems.

The CSP problem was introduced with onClick attribute in #3133439: Disable Add Above when Add Mode is other than Modal .

Mousedown event was introduced in #2946514: Add paragraph before button . The reason why click event didn't work was explained in comment 43 point 4, but that was fixed in #3092762: Unable to access toggle button options using keyboard navigation. .

Additionally, the clickHandler needed to stop propagation of mousedown event in #3213737: 'Add above' in edit paragraph library in modal is behind parent dialog , not sure if that is the case with click event.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Experimental Widget

Created by

🇫🇮Finland olli

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024