Bug 1718571 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Andrew McCreight [:mccr8] from comment #5)
> the bad behavior I'm seeing is slightly different than described. The page navigates to hixie.ch, while the dialog remains, but we never do the navigation to Mozilla. 

I can see this behavior too with the old content prompts too. You can set the pref  `prompts.contentPromptSubDialog` to false to get the old ones. The only difference is the old prompts are dismissed when the page finally navigates to hixie.ch, but still no navigation to Mozilla. 

(In reply to Micah [:mtigley] (she/her) from comment #10)
> The changes from bug1680637, specifically: https://searchfox.org/mozilla-central/rev/538569c63ffb17d590c51df66f9fff790dd7431e/browser/base/content/browser.js#9317-9333 , are likely related to these prompts persisting on a redirect. I would think the prompts would be closed `onLocationChange`, but it seems this isn't triggered using the above test cases. In general, we need to make sure `abortDialogs()`  is called on a redirect.

It looks like we'd need make sure `TabDialogBox.onLocationChange` is also called from the [tabbrowser's onLocationChange ](https://searchfox.org/mozilla-central/rev/170547001c81e7ec05f2855d8349b6b7e97c2658/browser/base/content/browser.js#5451). We'd need to do something like:

```js
let tabDialogBox = gBrowser.getTabDialogBox();
tabDialogBox.onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags);
```

This should fix the prompts not persisting on a redirect, but I don't think it addresses why the navgiation to Mozilla never happens.
(In reply to Andrew McCreight [:mccr8] from comment #5)
> the bad behavior I'm seeing is slightly different than described. The page navigates to hixie.ch, while the dialog remains, but we never do the navigation to Mozilla. 

I can see this behavior too with the old content prompts too. You can set the pref  `prompts.contentPromptSubDialog` to false to get the old ones. The only difference is the old prompts are dismissed when the page finally navigates to hixie.ch, but still no navigation to Mozilla. 

(In reply to Micah [:mtigley] (she/her) from comment #10)
> The changes from bug1680637, specifically: https://searchfox.org/mozilla-central/rev/538569c63ffb17d590c51df66f9fff790dd7431e/browser/base/content/browser.js#9317-9333 , are likely related to these prompts persisting on a redirect. I would think the prompts would be closed `onLocationChange`, but it seems this isn't triggered using the above test cases. In general, we need to make sure `abortDialogs()`  is called on a redirect.

It looks like we'd need make sure `TabDialogBox.onLocationChange` is also called from the [tabbrowser's onLocationChange ](https://searchfox.org/mozilla-central/rev/170547001c81e7ec05f2855d8349b6b7e97c2658/browser/base/content/browser.js#5451). We'd need to do something like:

```js
let tabDialogBox = gBrowser.getTabDialogBox();
tabDialogBox.onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags);
```

This should fix the prompts persisting on a redirect, but I don't think it addresses why the navgiation to Mozilla never happens.

Back to Bug 1718571 Comment 11