Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox: Microsoft Answers is broken #100

Closed
PowerWeb5 opened this issue Jun 20, 2017 · 9 comments
Closed

Firefox: Microsoft Answers is broken #100

PowerWeb5 opened this issue Jun 20, 2017 · 9 comments
Labels

Comments

@PowerWeb5
Copy link

PowerWeb5 commented Jun 20, 2017

Even when I have no styles installed and have disabled Stylus via the "Turn all styles off" option, its scripts and I believe CSS are still injected into, running, and completely break some websites like Microsoft Answers. You can see this at the following page, by logging in and then clicking Reply.

You will see that Submit and Cancel buttons for the Reply fail to work, as well as text editor dialog overlays like Insert Hyperlink's Insert and Cancel buttons fail to work/close that dialog (as can be seen after clicking the Insert Hyperlink text editor toolbar button).
There is a spinning waiting indicator shown forever above the Submit button that only occurs when Stylus is installed..

I have reproduced this issue with both Stable and Developer Editions of Firefox.

Page Where Issues Occurs (Begin Editing a Reply to See the Issue):

https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/microsoft-mouse-keyboard-center-v30-will-not/1cbc5891-0c23-4cbb-99f2-fb5729850bf7

My Configuration

  • Stylus v1.1.0
  • Firefox Developer Edition x64 v55.0b2 (but also occurs with stable Firefox release)
  • Windows 10 x64
@tophf
Copy link
Member

tophf commented Jun 20, 2017

I can see it in FF55 dev intermittently, and in standard FF, but not in Chrome. I see no obvious problems in our content script code, I don't use FF either, so setting the meta accordingly. On a side note, it's kinda possible to remove our content script in FF by switching to chrome.tabs.insertCSS and removeCSS, but those functions are really dumb, I've already tried switching and concluded that the limitations/drawbacks defeat the gains.

An angle to pursue: the site contains two iframes so it's possible FF handles content script injection differently or incorrectly, thus breaking the functionality.

@tophf tophf changed the title Breaks Microsoft Answers, etc. Websites even when Disabled for Firefox Firefox dev: Microsoft Answers is broken Jun 20, 2017
@tophf tophf changed the title Firefox dev: Microsoft Answers is broken Firefox: Microsoft Answers is broken Jun 20, 2017
@schomery
Copy link
Contributor

Even with a completely empty "apply.js", still, this spinning occurs. Unless we change to code to not inject apply.js at all when Stylus is globally off, there is no way to fix this issue.

Since you are going to have this issue will all other WebExtension add-ons that are injecting scripts into web pages, I would say open a bug report in Bugzilla. This is not a Stylus specific issue.

@tophf
Copy link
Member

tophf commented Jun 21, 2017

FWIW switching to programmatic injection would mean removing the automatic injection in manifest, and my old tests showed a noticeably bigger delay leading to a frequent FOUC. This might have changed since. Not that it will guarantee the FF bug can be circumvented, though.

@schomery
Copy link
Contributor

Switching to programmatic injection is a mess. I would say it is better to not go that direction unless we really have to.

@tophf
Copy link
Member

tophf commented Jun 27, 2017

"all_frames": true is what triggers the FF bug.
It affects all WebExtensions that use this setting for their content scripts. Like thousands?

OTOH the MS site uses quite a weird src='javascript:""' for the iframe so I'm not surprised FF stumbles on that.

@tophf
Copy link
Member

tophf commented Oct 1, 2017

Fixed in FF 58 Nightly.

@grahamperrin
Copy link

Fixed in FF 58 Nightly.

Without me resorting to mozregression (or the like) … please, do you know which changeset included the fix?

Context: https://redd.it/akpg72 involving some versions of Waterfox, not all users; Waterfox 56.0 was based on Firefox 56.0.2 and we're now at Waterfox 56.2.7.1.

@tophf
Copy link
Member

tophf commented Feb 5, 2019

Alas, I didn't investigate it.

@grahamperrin
Copy link

OK, thanks for the quick response.

Found: Mozilla bug 1397399 - unable to reply to post at answers.microsoft.com with AdBlock Plus add-on enabled RESOLVED DUPLICATE of 1379148 - document.write does not synchronously modify a document if an extension has content scripts at document_start

1379148

https://github.com/MrAlex94/Waterfox/search?q=1379148&type=Commits finds eight commits but I shouldn't assume that they're effective.

Considering that I can not reproduce the issue with an unofficial build of Waterfox ~56.2.7.1 on FreeBSD-CURRENT:

grahamperrin@momh167-gjp4-8570p:~ % date ; uname -v
Tue  5 Feb 2019 06:49:38 GMT
FreeBSD 13.0-CURRENT r343308 GENERIC-NODEBUG 
grahamperrin@momh167-gjp4-8570p:~ % find /usr/local/poudriere/ports/default/www/waterfox/files -name "*1379148*" 
/usr/local/poudriere/ports/default/www/waterfox/files/patch-bug1379148
grahamperrin@momh167-gjp4-8570p:~ % 

– just one file.

https://www.freshports.org/www/waterfox/Makefilehttps://svnweb.freebsd.org/ports?view=revision&revision=461852https://svnweb.freebsd.org/ports/head/www/waterfox/files/patch-bug1379148?view=markup&pathrev=461852 with reference to MozReview-Commit-ID: 8cGxywiUzWj

https://github.com/search?q=org%3Amozilla+8cGxywiUzWj&type=Commits finds two commits.


FreeBSD aside: I can reproduce the issue with (extended) Waterfox 56.2.7.1 on Lubuntu so I'll take this to the GitHub repo for Waterfox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants