jQuery/once (https://www.drupal.org/node/3158256) was deprecated in Drupal 9.3 and removed from Drupal 10.
This patch replaces it and makes use of the core/once library.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | interdiff_13-18.txt | 837 bytes | cballenar |
| #18 | paragraphs_browser-core_once-3340467-18.patch | 1.74 KB | cballenar |
| #9 | paragraphs-browser-jquery-once-d10.patch | 1.74 KB | stefvanlooveren |
| #13 | paragraphs_browser-core_once-3340467-13.patch | 1.7 KB | j-vee |
| replace_jquery_once_with_core_once.patch | 961 bytes | albertosilva |
Issue fork paragraphs_browser-3340467
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
Comment #2
albertosilvaComment #3
arnaud-brugnon commentedThis is quite important.
8.x-1.1 is supposed to be compatible with Drupal 10.
Comment #4
fabsgugu commentedI confirm, this fix is important for Drupal 10.
I tested it, it works, the error is no longer present.
Comment #5
oierbravo commentedTested with 10.1.0, it works!
Comment #6
edmund.dunn commentedALso tested on 10.1 and this fixed everything right up for us! Thank you!
Comment #7
agudivad commentedThanks! It is worked with 10.1.1 version as well.
Comment #8
tim-dielsTested and works, thanks!
Comment #9
stefvanlooveren commentedAlso had a patch for this before I found this.
Comment #10
bohus ulrychHi all,
only first patch replace_jquery_once_with_core_once.patch works as expected.
The other one - paragraphs-browser-jquery-once-d10.patch - fixes errors in the console, but functionality doesn't work.
Goal of this Drupal.behaviors.PBStyling was to enable whole fieldset clickable. But now it doesn't work, because
* e.target.matches catches img tag and also it's parent div, only when you click outside then condition (e.target.matches('.paragraphs-browser-paragraph-type')) is try
* but still then it seem that
inputElement.dispatchEvent(new Event('mousedown'));do nothingThanks
Comment #11
simonbaeseTested patch in #9 with Drupal 10.1! Fixes the issue for me.
Comment #12
aasarava commentedConfirmed that the patch works, thanks! Would be great to get a new release so that there's a true D10-compatible release of the module.
Comment #13
j-vee commentedThe patch here broke functionality with clicking on the fieldset to add a new paragraph instead of the Add-button directly. The same issue raised by #10.
Issue was javascript using currentTarget instead of target to select the button inside the fieldset element. Attached patch fixes that issue.
Comment #14
mlncn commentedAttesting to the efficacy of j-vee's patch in #13!
Comment #15
simonbaeseWorked with patch #13 for a couple weeks now. Fixes the described issues.
Comment #16
bohus ulrychPatch #13 now works for me without any problem. Thanks!
Comment #17
alphex commented#13 works as expected.
Thank you!
Comment #18
cballenar commentedI found that the patch was not taking into consideration clicking on other elements within the fieldset. Mainly clicking on the image/thumbnails of the paragraph. By checking if the target's closest we check if the current element or a parent of it is the fieldset we need. Then we target the input of said fieldset.
Comment #19
damienmckenna+1 for #18.
Comment #20
bohus ulrychYes! #18 works even when clicked on the image.
Comment #21
gerzenstl commentedI can confirm the patch from #18 works.
I tested on:
Drupal 10.2.1
paragraphs_browser 1.1.0
Comment #22
fabsgugu commentedHello,
I think we should release a new version for this module.
There are several tickets to commit. (Like https://www.drupal.org/project/paragraphs_browser/issues/3347934)
Comment #23
rymcveighI can confirm that the patch from #18 works for me as well.
I tested on:
Drupal 10.2.3
paragraphs_browser 1.1.0
I completely agree that there needs to be a new release of this version.
Comment #24
phannphong commentedThe path #18 is working well and I think it can be delivered asap.
Comment #26
kgatzby commentedAssigning credit
Comment #28
kgatzby commented#18 was applied. Thanks everybody for the help!