Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Receiving the following error with with current dev:
TypeError: $.browser is undefined
Upon searching this issue queue, I located #453048: HS select becomes disabled after refreshing page in Firefox which led me to the fix of simply commenting out the lines added in as a result of that issue:
if ($.browser.mozilla) {
$('#hierarchical-select-'+ hsid +'-wrapper').parents('form').attr('autocomplete', 'off');
}
I need to test some more and make sure that doesn't introduce any other errors. If it doesn't, I'll post a patch.
Comment | File | Size | Author |
---|---|---|---|
#2 | hierarchical_select-jQuery.browser_is_undefined-2315453-2.patch | 1.29 KB | lklimek |
#1 | undefined_browser_mozilla-2315453-1.patch | 691 bytes | mikran |
Comments
Comment #1
mikran CreditAttribution: mikran commentedI'll be testing too. I rolled this into a patch
Comment #2
lklimek CreditAttribution: lklimek commentedThis issue is specific to jQuery 1.9+.
My approach here is to replace $.browser with navigator.userAgent.indexOf("Firefox") . And $.browser occurs in the code one more time.
See patch against 7.x-3.0-alpha6 in the attachment.
Comment #3
stefan.r CreditAttribution: stefan.r commented