Problem/Motivation

I realized that if the field we want to limit is inside a Paragraph, it only works on the initial page load (when the paragraph is open by default). On all other interactions (collapsing+opening, adding a new paragraph, etc), our JS doesn't kick-in. We should make sure all paragraph interactions also trigger our JS. Our markup is still there, we just seem to make sure the JS runs again.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork sam-3271601

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

marcoscano created an issue. See original summary.

hawkeye.twolf made their first commit to this issue’s fork.

hawkeye.twolf’s picture

Status: Active » Needs review

PR up! #3

The basic issue was the once() being run against the body selector. Ajax responses rarely replace the entire body element, so all the code inside once() was only executing one time per page load.

I also took the liberty of making the input text ineditable (type=submit) while I was in there.

marcoscano’s picture

Status: Needs review » Fixed

Thanks @Hawkeye! I've added a quick test, but it looks great! 👍

Status: Fixed » Closed (fixed)

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