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.

Issue fork paragraphs-3359321

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

olli created an issue. See original summary.

olli’s picture

Status: Active » Needs review
StatusFileSize
new1.7 KB

keshav.k made their first commit to this issue’s fork.

sokru made their first commit to this issue’s fork.

sokru’s picture

Status: Needs review » Reviewed & tested by the community

Rebased and converted the patch to MR. Tested the fix manually to be working and since the test results are green, changing the status to RTBC.

berdir made their first commit to this issue’s fork.

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.