Setting focus to a dialog window doesn't work anymore

RESOLVED WORKSFORME

Status

P5
normal
RESOLVED WORKSFORME
a year ago
a year ago

People

(Reporter: MakeMyDay, Unassigned)

Tracking

Lightning 5.6

Details

(Reporter)

Description

a year ago
Probably after landing of bug 835981 part 7, setting focus to a dialog window like at [1] doesn't work anymore - all of nsIDOMXULElement including focus() was removed. See also bug 1355151.

This is something we need to take care of on the road to html based dialogs - do we already have a meta bug for that?

[1] https://dxr.mozilla.org/comm-central/source/calendar/base/content/calendar-item-editing.js#384
Priority: -- → P5
(Reporter)

Comment 1

a year ago
From https://bugzilla.mozilla.org/show_bug.cgi?id=1355151#c3

>> From Lightning 5.6 onwards moving the existing window to the front will not
>> work anymore due to removal of all of nsIDOMXULElement including focus()
>> with bug 835981 (part 7). So, for these versions, this patch still prevents
>> opening another window, but doesn't move the existing window in the
>> foreground. If filed bug 1356878 for that.
>
>I can't reproduce that. When I open (or re-open) the dialog by double-clicking on an event, it gets >moved on foreground and gets the focus. Is there a particular way to reproduce?

I can reproduce the issue on the latest Daily on Windows 7. Decathlon, on which platform have you tested this?
Flags: needinfo?(bv1578)

Comment 2

a year ago
I've just retested and I can't reproduce.

I'm on Win7 with Thunderbird 55.0a1 32bit Build ID 20170430030210 just downloaded from repositories.
Lightning 5.7a1 shipped with Thunderbird.
For the record, I use the versions without installer i.e. the zip files on the repositories.

Steps to reproduce:
- enabled Lightning and restart;
- open calendar tab, switch to month view, create a new event by double-click on the view -> the edit dialog get opened in foreground and takes the focus, save and close the event with default values;
- reopen the event by double-click on the item in month view -> the edit dialog gets opened in foreground and takes the focus: typing on the keyboard the event titles gets modified, save and close command works and the event is saved with modification;

- reopen the even again by double-click on the item in month view -> the edit dialog gets opened in foreground and takes the focus;
- click on the month view -> Thunderbird is now in foreground and gets the focus, the event dialog goes in background without focus;
- double click on the item in month view -> the event dialog in background now gets moved in foreground with focus and Thunderbird goes in background, now if I type something, the event title gets modified, save and close works.


I had the doubt that the 64bit version could behave differently, so I downloaded also that version but I get the same exact behavior.

The difference between 32bit and 64bit is about bug 1360914. On a fresh profile I can see that bug on the 64bit version but not on the 32 version.
Flags: needinfo?(bv1578)
(Reporter)

Comment 3

a year ago
Thanks for checking. I am expiriencing this also with the 32 bit version, even with all other addons disabled. However, I wasn't able to reproduce this with a new profile, so there's probably one obscure setting screwed up (I probably should switch to a fresh profile from time to time).
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.