Headroom stopped working after update to Drupal 10. I get the browser error:
Uncaught TypeError: $(...).once is not a function

"once" is at line 13 of headroom.drupal.js

Drupal.behaviors.headroomjs = {
    attach: function (context, settings) {
      if (typeof drupalSettings.headroomjs !== 'undefined' && $(drupalSettings.headroomjs.selector).length !== 0) {
        $(drupalSettings.headroomjs.selector).once('init').headroom({...

Seems to be same problem on dev branch as well.

Issue fork headroomjs-3406446

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

jonodunnett created an issue. See original summary.

ighosh’s picture

If no one is working on it actively, I can pick this up. Cheers!

ighosh’s picture

Assigned: Unassigned » ighosh

jonodunnett’s picture

I am using your patch and that fixes it, thankyou IGhosh.

ighosh’s picture

Hi jonodunnett. Thanks for letting me know.

sourabhjain’s picture

Assigned: ighosh » Unassigned
Status: Active » Needs review

  • HongPong committed ad54985e on 8.x-1.x authored by IGhosh
    Issue #3406446 - By ishanghosh27 (Ishan Ghosh), jonodunnett (Jonathan...
hongpong’s picture

Status: Needs review » Fixed

Thank you everyone! Will release a new version on this important fix.

ighosh’s picture

Status: Fixed » Closed (fixed)

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

ighosh’s picture

Hi @HongPong, could you please give the above users who worked on & tested this issue credits accordingly? This might have been missed accidentally. :)

ighosh’s picture

Hi @HongPong, Can you please check your Slack DM?
Kindly please give the above users who worked on & tested this issue credits accordingly.