- Merge request !328Issue #3546057 by bburg: Adds context to once in dropdown widget. β (Open) created by bburg
In dropdown-widget.js, the makeDropdown function calls once() without passing the context.
$(once('facets-dropdown-transform', '.js-facets-dropdown-links')).each(function () {
This can cause problems in environments with BigPipe/Ajax. I'm dealing with an intermittent bug on a site now, where sometimes selecting a new option automatically triggers, sometimes it doesn't. I haven't been able to pin down exactly how this is caused, but I suspect it's related to this code not using context with once.
To fix, add context in the once call:
$(once('facets-dropdown-transform', '.js-facets-dropdown-links', context)).each(function () {
I'm not 100% certain this will address what I'm seeing, but it seems like a probably culprit. I'm not certain how much using context here is a "best practice"
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.