Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#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

  1. Open the options page
  2. Close the options page
  3. Reopen the options page
  4. 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();
    });
  }
});

Change History (8)

comment:1 Changed 14 months ago by greiner

  • Cc agiammarchi saroyanm added

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.

comment:2 Changed 14 months ago 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 14 months ago 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 14 months ago by geo

  • Owner set to geo
  • Review URL(s) modified (diff)

comment:5 Changed 14 months ago by greiner

  • Status changed from new to reviewing

comment:6 Changed 14 months ago by greiner

  • Blocking 6936 added

comment:7 Changed 14 months ago by greiner

  • Blocking 6962 added; 6936 removed
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:8 Changed 14 months ago by abpbot

A commit referencing this issue has landed:
Issue 6960 - Reopening the options page causes issues

Note: See TracTickets for help on using tickets.