Closed (fixed)
Project:
Simple Add More
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2022 at 07:39 UTC
Updated:
24 Apr 2022 at 19:54 UTC
Jump to comment: Most recent
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.
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
Comment #4
hawkeye.twolfPR up! #3
The basic issue was the
once()being run against thebodyselector. Ajax responses rarely replace the entire body element, so all the code insideonce()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.
Comment #6
marcoscanoThanks @Hawkeye! I've added a quick test, but it looks great! 👍