Closed Bug 1545241 Opened 5 years ago Closed 5 years ago

Firefox v. 66.0.3 appears to break knockout.js v3.3.0

Categories

(Core :: DOM: Core & HTML, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: clewis, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36

Steps to reproduce:

On our web site, user logs in, and knockout.js is used to control the appearance / behaviour of certain DOM elements. With the latest version of firefox, our site no longer works correctly. It worked in v. 66.0.2

The site is based on magento v2.1.15

Actual results:

Essentially knockout.js does not acquire the correct logged in state and certain page elements do not work correctly as a result.

Expected results:

On previous versions of firefox, and on other browsers (safari, chrome, etc.) the correct logged in status is reflected on the web site.

Hi, I'm not entirely sure how to reproduce this issue, Maybe you can provide the website link so we can reproduce the issue ourselves ? if that is not possible can you please try our latest nightly build and verify if the issue occurs on that version as well ?

Maybe this issue is already fixed in our Latest Beta or Nightly builds:

Beta - https://www.mozilla.org/ro/firefox/channel/desktop/

Nightly - https://nightly.mozilla.org/

Component: Untriaged → JavaScript Engine
Product: Firefox → Core

After more research, it appears that the window.ready event was being used instead of document.ready.

In prior releases of firefox, window.ready worked fine, but now that event is not compatible with our site's logic.

Thank you for the reply.

Thanks for reporting this. Do you have a URL or test case we can look at?

Component: JavaScript Engine → DOM: Core & HTML

The site was https://www.bluecosmo.com - but we have already patched the site.

(In reply to clewis from comment #4)

The site was https://www.bluecosmo.com - but we have already patched the site.

What change did you need to make?

Flags: needinfo?(clewis)

Sorry, it's in comment 2.

Flags: needinfo?(clewis)

(In reply to clewis from comment #2)

After more research, it appears that the window.ready event was being used instead of document.ready.

In prior releases of firefox, window.ready worked fine, but now that event is not compatible with our site's logic.

I don't see window.ready or document.ready in Knockout. Do you mean you are mixing jQuery and Knockout? The sites seems to include jQuery? (I wasn't even aware of jQuery having window.ready.)

Mike, do you have an opinion on what we should conclude from this report?

Flags: needinfo?(miket)

Very few changes between 66.0.2 and 66.0.3:
https://hg.mozilla.org/releases/mozilla-release/shortlog/37ecfd08ffee

The DOM changes relate to key event handling, not to readyState or DOMContentLoaded.

Note to self, if you have an ad blocker, the site never fully renders (you just get a progress loader thing):

Error: Script error for: Magento_GoogleTagManager/js/google-analytics-universal
http://requirejs.org/docs/errors.html#scripterror

If the site in fact worked in 66.0.2 and stopped in 66.0.3... I can't see how the keypress behavior whitelist patches would be related (since they're scoped to hostnames).

clewis, were you testing on windows by chance? We did land https://bugzilla.mozilla.org/show_bug.cgi?id=1537609, which could maybe somehow be related?

Also, can you describe (or upload here) the patch required to fix the site? thanks.

Flags: needinfo?(miket) → needinfo?(clewis)

Hang on, I see https://github.com/knockout/knockout/issues/2421 -- which also mentions magento. The problem might be in Magento.

I left a comment here: https://github.com/knockout/knockout/issues/2421#issuecomment-486432729

(But it sounds like the reporter is not describing a key event related issue...)

Oh, I saw the knockout issue was closed. Dear reporter, do you still see this issue?

Close as INCOMPLETE. Please feel free to reopen.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.