incontrol.landrover.com - Dropdowns are not working on page
Categories
(Web Compatibility :: Site Reports, defect, P2)
Tracking
(Webcompat Priority:P3, Webcompat Score:1)
People
(Reporter: railioaie, Assigned: twisniewski)
References
(Regression, )
Details
(4 keywords, Whiteboard: [webcompat-source:web-bugs])
User Story
platform:windows,mac,linux,android impact:site-broken configuration:general affects:all branch:release diagnosis-team:dom user-impact-score:0
Attachments
(2 files, 1 obsolete file)
Environment:
Operating system: Windows 10
Firefox version: Firefox 141.0
Preconditions:
Clean profile
Steps to reproduce:
- Navigate to: https://incontrol.landrover.com/jlr-portal-owner-web/select-locale
- Click on : Select a market-> Select a language
- Observe
Expected Behavior:
Dropdowns are working
Actual Behavior:
Dropdowns are not working
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/172106
Comment 2•10 months ago
|
||
<a href="javascript:void(0)" onclick="return false;" class="select2-choice" tabindex="-1">
so I'm honestly not even sure why it works in Chrome.
Comment 3•10 months ago
|
||
Their select2 implementation is reliant on DOM Mutation Events. Enabling dom.mutation_events.enabled makes this website functional again.
Steps to reproduce:
- Visit
about:config - Search for
dom.mutation_events.enabledand ensure it is enabled (true) - Navigate to: https://incontrol.landrover.com/jlr-portal-owner-web/select-locale
- Click on : Select a market, then Select a language
- Observe site is functioning correctly.
Updated•10 months ago
|
Comment 4•10 months ago
|
||
Does the site work in Safari?
Does it help to add string pref dom.mutation_events.forceEnable and add incontrol.landrover.com to it?
(Or should it be https://incontrol.landrover.com, or *.landrover.com)
Comment 5•10 months ago
|
||
dom.mutation_events.forceEnable="*.landrover.com" seems to help locally
Comment 6•10 months ago
•
|
||
Adding the value of incontrol.landrover.com to dom.mutation_events.forceEnable suffices in making the site usable again.
Safari works because WebKitMutationObserver exists, and the website has a check for this. The relevant code:
// mozilla and IE
el.on("propertychange.select2 DOMAttrModified.select2", sync);
// hold onto a reference of the callback to work around a chromium bug
if (this.mutationCallback === undefined) {
this.mutationCallback = function (mutations) {
mutations.forEach(sync);
}
}
// safari and chrome
if (typeof WebKitMutationObserver !== "undefined") {
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
this.propertyObserver = new WebKitMutationObserver(this.mutationCallback);
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
}
I think the code could be patched to use MutationObserver proper, so the above block of code could simply be:
if (this.mutationCallback === undefined) {
this.mutationCallback = function (mutations) {
mutations.forEach(sync);
}
}
let MO = window.MutationObserver || window.WebKitMutationObserver;
// safari and chrome
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
this.propertyObserver = new WebKitMutationObserver(this.mutationCallback);
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
Alternatively we could add an intervention for this site, which I have confirmed works:
window.WebkitMutationObserver = MutationObserver
Updated•10 months ago
|
Comment 7•10 months ago
|
||
Wow...
Looks like Window.WebkitMutationObserver is just an alias of MutationObserver.
https://searchfox.org/wubkat/source/__GENERATED__/WebCore/DerivedSources/DOMWindowConstructors.idl#451
attribute MutationObserverConstructor MutationObserver;
attribute MutationObserverConstructor WebKitMutationObserver; // Legacy Window alias.
So, adding the alias might be better? I'm not sure.
Comment 8•10 months ago
|
||
Comment 9•10 months ago
|
||
The reported website detects MutationObserver with the alias.
Therefore, it's required to make the website work on Firefox.
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Comment 10•9 months ago
|
||
Comment 11•9 months ago
|
||
Comment 12•9 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•9 months ago
|
Updated•9 months ago
|
Updated•4 months ago
|
Description
•