Opened on 09/17/2018 at 04:31:15 PM
Closed on 09/20/2018 at 10:47:57 AM
Last modified on 09/26/2018 at 10:33:57 AM
#6960 closed defect (fixed)
Reopening the options page causes issues
Reported by: | geo | Assignee: | geo |
---|---|---|---|
Priority: | P1 | Milestone: | |
Module: | User-Interface | Keywords: | |
Cc: | sebastian, greiner, agiammarchi, saroyanm | Blocked By: | |
Blocking: | #6962 | Platform: | Edge |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/merge_requests/122 |
Description
Environment
Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134
How to reproduce
- Open the options page
- Close the options page
- Reopen the options page
- Change any setting
Observed behaviour
The UI is not updating and inspecting the background page reveals an The handle is invalid error.
Expected behaviour
The UI should update.
Background information
This behavior is caused by an Edge bug, basically port.onDisconnect event never fires, so a possible solution is to manually call port.disconnect when the page is unloaded.
Possible solution
Adding something like the following code to desktop-options solves the problem.
browser.runtime.sendMessage({ type: "app.get", what: "platform" }, (platform) => { if (platform == "edgehtml") { window.addEventListener("unload", () => { port.disconnect(); }); } });
Attachments (0)
Change History (8)
comment:1 Changed on 09/17/2018 at 05:11:25 PM by greiner
- Cc agiammarchi saroyanm added
comment:2 Changed on 09/17/2018 at 05:39:32 PM by greiner
- Priority changed from Unknown to P1
- Ready set
I can reproduce this issue with our development build which, however, still seems to be on 0.9.11.2076. Apart from that it also appears in the latest build so I'm setting this ticket to ready.
comment:3 Changed on 09/17/2018 at 06:17:30 PM by sebastian
The development builds for Microsoft Edge are outdated. Our development build automation currently fails due to an issue with manifoldjs that needs to be addressed by Microsoft.
comment:4 Changed on 09/18/2018 at 07:20:54 PM by geo
- Owner set to geo
- Review URL(s) modified (diff)
comment:5 Changed on 09/19/2018 at 01:29:03 PM by greiner
- Status changed from new to reviewing
comment:6 Changed on 09/19/2018 at 01:31:04 PM by greiner
- Blocking 6936 added
comment:7 Changed on 09/20/2018 at 10:47:57 AM by greiner
- Blocking 6962 added; 6936 removed
- Resolution set to fixed
- Status changed from reviewing to closed
comment:8 Changed on 09/26/2018 at 10:33:57 AM by abpbot
A commit referencing this issue has landed:
Issue 6960 - Reopening the options page causes issues
Thanks for the detailed ticket and for including a possible solution. I'll take a look at whether I can reproduce this issue as soon as I've finished updating the Windows in my VM.
In general, I don't see an issue with adding the "unload" listener for all platforms as it doesn't seem to do anything we wouldn't want to do anyway.