Closed Bug 1253486 Opened 8 years ago Closed 8 years ago

[e10s] drop-down list stays visible when <select> disappears

Categories

(Core :: Layout: Form Controls, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla48
Tracking Status
e10s m9+ ---
firefox46 --- affected
firefox47 --- wontfix
firefox48 --- verified

People

(Reporter: arni2033, Assigned: enndeakin)

References

(Blocks 1 open bug, )

Details

Attachments

(2 files)

>>>   My Info:   Win7_64, Nightly 47, 32bit, ID 20160229030448
STR:
1. Open http://example.org/ in a new window, close other tabs in that window
2. Open   data:text/html,<select><option>1<option>2</select>   in a new tab in that window
3. Click <select>'s dropmarker to open drop-down list of options
4. Press Ctrl+W to close the tab

AR:  The tab with http://example.org/ is selected, but the drop-down list is still visible
ER:  The drop-down list should be destroyed and hidden
This is a dupe of bug 1247420 - we need to close the menu in the parent once the node has gone away (see STR in bug 1247420, comment 14)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
STR_2:
1. Open the following "data:" url or click URL in the form above
>   data::,<script>setTimeout('document.body.innerHTML=0',4000)</script><select><option>
2. In less than 4 seconds open select's drop-down list. Wait 4 seconds

AR:  <select> is deleted, but drop-down list is still visible
ER:  The drop-down list should be destroyed and hidden

Note:  Compressed <select> is bug 1237485.
Blocks: e10s-select
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: [e10s] <select>'s drop-down list stays visible when I close tab with Ctrl+W → [e10s] drop-down list stays visible when <select> disappears
categorization needed
Flags: needinfo?(jgriffiths)
(In reply to Jim Mathies [:jimm] from comment #4)
> categorization needed

Prioritization?

This is pretty bad, developers should be able to rely on that list going away. I'm marking this as blocking, willing to discuss if you disagree.
Flags: needinfo?(jgriffiths) → needinfo?(jmathies)
Priority: -- → P1
Niel, can you take this?
Flags: needinfo?(enndeakin)
Flags: needinfo?(jmathies)
Assignee: nobody → enndeakin
Status: REOPENED → ASSIGNED
Flags: needinfo?(enndeakin)
(In reply to Neil Deakin from comment #7)
> Created attachment 8739058 [details] [diff] [review]
> Hide select popup when <select> or tab is destroyed

Hey Neil, let me know if you need review on this.
Comment on attachment 8739058 [details] [diff] [review]
Hide select popup when <select> or tab is destroyed

I haven't tested it yet but it should be mostly ok, and if you're offering...
Attachment #8739058 - Flags: review?(mconley)
Comment on attachment 8739058 [details] [diff] [review]
Hide select popup when <select> or tab is destroyed

Review of attachment 8739058 [details] [diff] [review]:
-----------------------------------------------------------------

Assuming your test passes in automation, this looks good to me.

::: browser/base/content/test/general/browser_selectpopup.js
@@ +26,5 @@
>    "  </optgroup></select><input />Text" +
>    "</body></html>";
>  
> +const PAGECONTENT_SMALL =
> +  "<html>" + 

Trailing ws

@@ +147,5 @@
>  
>    is(selectPopup.lastChild.previousSibling.label, "Seven", "Spaces collapsed");
>    is(selectPopup.lastChild.label, "\xA0\xA0Eight\xA0\xA0", "Non-breaking spaces not collapsed");
>  
> +  BrowserTestUtils.removeTab(tab);

Should yield this.

@@ +174,5 @@
> +  yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
> +    content.document.body.removeChild(content.document.getElementById("two"));
> +  });
> +
> +  // Hopefully, the event will arrive by now and close the popup.

But we don't want it to close the popup, right?

@@ +196,5 @@
> +  // Finally, try it when the tab is closed while the select popup is open.
> +  yield openSelectPopup(selectPopup, true, "#one");
> +
> +  popupHiddenPromise = BrowserTestUtils.waitForEvent(selectPopup, "popuphidden");
> +  BrowserTestUtils.removeTab(tab);

Should yield this.
Attachment #8739058 - Flags: review?(mconley) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b00232b9f65b6195f4f01167747325fd6c140a9c
Bug 1253486, [e10s only] hide select popups when the select element is removed, r=mconley
https://hg.mozilla.org/mozilla-central/rev/b00232b9f65b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Marking status-firefox47=wontfix unless Blake thinks we should uplift this <select> popup fix to 47.
Flags: qe-verify+
Reproduced on Nightly 2016-03-23 Win 7.
Verified fixed FX 48b2.
Status: RESOLVED → VERIFIED
Depends on: 1305017
Depends on: 1448813
Depends on: 1516550
Regressions: 1740451
No longer regressions: 1740451
Regressions: 1740439
Regressions: 1740474
Regressions: 1740609
You need to log in before you can comment on or make changes to this bug.