Opened on 04/21/2016 at 12:33:02 PM
Closed on 04/21/2016 at 06:07:47 PM
Last modified on 04/22/2016 at 12:08:49 AM
#3964 closed defect (fixed)
Console errors when using CSS property filters
Reported by: | Ross | Assignee: | trev |
---|---|---|---|
Priority: | P1 | Milestone: | Adblock-Plus-2.7.3-for-Firefox |
Module: | Adblock-Plus-for-Firefox | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Firefox | |
Ready: | yes | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description (last modified by trev)
Environment
ABP 2.7.2.4165
Reproduced with:
Firefox 44 / 45 / Windows 8
How to reproduce
- Launch Firefox open the Firefox console (CTRL+SHIFT+J).
- Install the latest ABP dev build.
- Add custom filter: testpages.adblockplus.org##[-abp-properties='width: 64px;']
- Navigate to https://testpages.adblockplus.org
- Refresh the page several times.
- Observe the logo is sometimes hidden but often not.
- Observe errors in console related to CSS property filters.
Observed behaviour
The initial behaviour of the filter looks correct and hides the logo. But after refreshing the page the filter no longer seems to apply to the page and several errors are printed into the console:
InvalidAccessError: A parameter or an operation is not supported by the underlying object cssProperties.js 79:0
(This error also appears with a source of "<unknown>".
Expected behaviour
Errors to not occur when using CSS property filters.
Background
CSS properties content script expects to run when all the stylesheets are already loaded. We are currently running it on DOMContentLoaded event in Firefox however, so there is chance that it will access a stylesheet that isn't loaded yet and trigger the exception above.
What to change
Run the content script from load event handler, not DOMContentLoaded.
Attachments (0)
Change History (5)
comment:1 Changed on 04/21/2016 at 12:54:48 PM by trev
- Description modified (diff)
- Owner set to trev
- Priority changed from Unknown to P1
- Ready set
comment:2 Changed on 04/21/2016 at 12:57:54 PM by trev
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:3 Changed on 04/21/2016 at 06:07:08 PM by abpbot
comment:4 Changed on 04/21/2016 at 06:07:47 PM by trev
- Milestone set to Adblock-Plus-2.7.3-for-Firefox
- Resolution set to fixed
- Status changed from reviewing to closed
comment:5 Changed on 04/22/2016 at 12:08:49 AM by Ross
- Tester changed from Unknown to Ross
- Verified working set
CSS property filters now work as expected and no longer cause errors shown the console.
ABP 2.7.2.4166
Firefox 45 / Windows 8
A commit referencing this issue has landed:
https://hg.adblockplus.org/adblockplus/rev/f5520175f5e3