MicrosoftEdge-Extensions icon indicating copy to clipboard operation
MicrosoftEdge-Extensions copied to clipboard

MS Edge crashes when user clicks a target="_blank" link in the sidepanel

Open twschiller opened this issue 1 year ago • 8 comments

We're hitting a nasty bug where MS Edge crashes when the user clicks a target=_blank URL in the sidepanel:

  • https://github.com/pixiebrix/pixiebrix-extension/issues/8206
  • https://github.com/pixiebrix/pixiebrix-extension/issues/7809

MS Edge crashes and on next startup, our extension is no longer installed

I'm surprised other developers haven't hit up against this? Or is there an existing bug ticket

We're currently trying to reliably intercept the clicks to use window.open or browser.tabs.create instead. However, in some cases there might be a frame embedded in the side panel. Therefore, we'd have to have a contentScript to just try to intercept link clicks for any frame that might appear within the sidepanel

twschiller avatar Apr 11 '24 01:04 twschiller

Ack. We will get back after investigating this.

mukul-p avatar Apr 18 '24 15:04 mukul-p

Appreciate the help! For others viewing this issue, here's our latest workaround for embedded iframes: https://github.com/pixiebrix/pixiebrix-extension/pull/8223

twschiller avatar Apr 18 '24 16:04 twschiller

@twschiller can you share a sample extension for reproducing this crash? I tried reproducing the crash using the extension published on the Chrome Web Store but couldn't.

rishikramena-ms avatar Apr 22 '24 07:04 rishikramena-ms

Hi @rishikramena-ms, thanks for investigating. Here's a repository with a minimal reproduction: https://github.com/pixiebrix/msedge-crash-repro.

Let me know if there's any other information I can provide!

I think the bug is related to the sidebar being tab-specific. It wasn't crashing for me when using a global sidebar

It might also be related to MS Edge's behavior of closing the tab-specific sidebar when opening a new tab: https://github.com/w3c/webextensions/issues/588

I tried reproducing the crash using the extension published on the Chrome Web Store but couldn't.

We've added a mitigation: https://github.com/pixiebrix/pixiebrix-extension/blob/44a3b1a8b947ec82af349779c8e4baa4435db0ac/src/utils/openAllLinksInPopups.ts#L38-L38

And are also currently working on a mitigation for embedded frames using a content script: https://github.com/pixiebrix/pixiebrix-extension/pull/8223

twschiller avatar Apr 25 '24 22:04 twschiller

@rishikramena-ms any updates here? Do you need any additional information form us? This crashing bug is preventing our enterprise customers from using MS Edge with our product

twschiller avatar Jul 04 '24 18:07 twschiller

Hi @twschiller,

Sorry for the delayed resolution. We are aware of this issue and have identified a fix for this. This should be resolved in a subsequent update. Will notify you on this thread once the fix is available publicly.

Thanks, Rishik

rishikramena-ms avatar Jul 08 '24 07:07 rishikramena-ms

The fix is now available in canary.

rishikramena-ms avatar Aug 06 '24 05:08 rishikramena-ms

In my case, adding rel="opener" to my links that also have target="_blank" seems to prevent the crash.

apawson avatar Aug 21 '24 17:08 apawson