Closed Bug 1334038 Opened 5 years ago Closed 4 years ago

<input type=date> seems to show selection pop up even when tab is changed

Categories

(Toolkit :: XUL Widgets, defect)

54 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla54
Tracking Status
firefox54 --- verified

People

(Reporter: kaarticsivaraam91196+bugzilla, Assigned: scottwu)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

I tried to use the <input type=date> tag after enabling it using dom.forms.datetime . It looks good, but it seems that when the pop-up for selecting date is visible and when I switch to another tab "using the shortcut" Ctrl+Tab, the pop-up doesn't close instead it is shown in the new tab where it isn't relevant and also partially hiding the contents of the new tab. (see screen shots). 

Browser : Nightly 54.0a1

Steps to reproduce:
0. Enable the newly added "date" type for input tag from about:config by setting the dom.forms.datetime to true
1. Open a HTML document with <input type=date> in it
2. Click the input box to open up the date selector
3. Switch to another tab using "Ctrl+tab"

Expected behaviour:
The date selector is closed

Actual behaviour:
The selector window is shown even in the new tab where the corresponding input field isn't present
Thanks for reporting this bug Kaartic!

I think all it takes is adding `tabspecific="true"` to the datetime panel:
http://searchfox.org/mozilla-central/rev/bf98cd4315b5efa1b28831001ad27d54df7bbb68/browser/base/content/browser.js#1470

Would you be able to take a quick look Mike? A similar issue happens to <select> dropdown as well. I'll file a bug if it's not reported already.
Assignee: nobody → scwwu
Flags: needinfo?(mconley)
Component: General → XUL Widgets
Product: Firefox → Toolkit
Comment on attachment 8830648 [details]
Bug 1334038 - datetime pickers should close on tab switch

https://reviewboard.mozilla.org/r/107388/#review109284

Looks good, thanks!
Attachment #8830648 - Flags: review?(mconley) → review+
Hey scottwu, thanks for the patch. For future reference, just the r? flag is fine. The additional needinfo? is not required. :)
Flags: needinfo?(mconley)
Got it. Thanks Mike!
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4057a8f658fc
datetime pickers should close on tab switch r=mconley
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4057a8f658fc
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Verified as fixed using the latest Nightly 54.0a1 (2017-02-28) on Windows 10 x64, Ubuntu 16.04 and Mac OS X 10.11.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.