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.

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

albertosilva created an issue. See original summary.

albertosilva’s picture

Status: Active » Needs review
arnaud-brugnon’s picture

Priority: Normal » Major

This is quite important.
8.x-1.1 is supposed to be compatible with Drupal 10.

fabsgugu’s picture

Status: Needs review » Reviewed & tested by the community

I confirm, this fix is ​​important for Drupal 10.
I tested it, it works, the error is no longer present.

oierbravo’s picture

Tested with 10.1.0, it works!

edmund.dunn’s picture

ALso tested on 10.1 and this fixed everything right up for us! Thank you!

agudivad’s picture

Thanks! It is worked with 10.1.1 version as well.

tim-diels’s picture

Tested and works, thanks!

stefvanlooveren’s picture

StatusFileSize
new1.74 KB

Also had a patch for this before I found this.

bohus ulrych’s picture

Hi 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 nothing

Thanks

simonbaese’s picture

Tested patch in #9 with Drupal 10.1! Fixes the issue for me.

aasarava’s picture

Confirmed 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.

j-vee’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.7 KB

The 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.

mlncn’s picture

Status: Needs review » Reviewed & tested by the community

Attesting to the efficacy of j-vee's patch in #13!

simonbaese’s picture

Worked with patch #13 for a couple weeks now. Fixes the described issues.

bohus ulrych’s picture

Patch #13 now works for me without any problem. Thanks!

alphex’s picture

#13 works as expected.

Thank you!

cballenar’s picture

I 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.

damienmckenna’s picture

+1 for #18.

bohus ulrych’s picture

Yes! #18 works even when clicked on the image.

gerzenstl’s picture

I can confirm the patch from #18 works.

I tested on:

Drupal 10.2.1
paragraphs_browser 1.1.0

fabsgugu’s picture

Hello,
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)

rymcveigh’s picture

I 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.

phannphong’s picture

The path #18 is working well and I think it can be delivered asap.

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

kgatzby’s picture

Assigning credit

  • kgatzby committed 5aee849f on 8.x-1.x
    Issue #3340467 by cballenar, albertosilva, stefvanlooveren, j-vee,...
kgatzby’s picture

Status: Reviewed & tested by the community » Fixed

#18 was applied. Thanks everybody for the help!

Status: Fixed » Closed (fixed)

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