Closed Bug 954953 Opened 7 years ago Closed 7 years ago

Keyboard behaviour in list of popular networks

Categories

(Instantbird :: Account wizard, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benediktp, Assigned: wnayes)

References

Details

Attachments

(1 file)

*** Original post on bio 1521 at 2012-06-19 09:56:00 UTC ***

At the moment pressing the "down" direction-key when nothing is selected yet will select the second network in the list. I've been expecting it to select the first account first (the current behaviour feels like it is skipping the first one for no obvious reason).
Blocks: 954826
*** Original post on bio 1521 at 2012-09-28 12:33:28 UTC ***

I was about to file a duplicate of this. I think this is the only detail of the top protocols page that still annoys me on a regular basis while debugging things :-).
OS: Windows XP → All
Hardware: x86 → All
*** Original post on bio 1521 at 2012-09-29 00:56:50 UTC ***

I think I have found the cause of this behavior in mozilla-central. When the listbox controls focus, the currentIndex gets changed for some reason.

http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/listbox.xml#602

Since we have a visible row at index 0, focus() sets currentIndex to zero, and the following keydown stroke increments it to 1. I am not sure whether this is a bug or not; I can't think of a reason why this happens, but there must be some purpose behind it.
*** Original post on bio 1521 as attmnt 1930 at 2012-09-29 01:20:00 UTC ***

This works around the listbox focus behavior by resetting the richlistbox currentIndex to its selectedIndex. Seems to be a bit of a hack, but it corrects the issue.
Attachment #8353686 - Flags: review?(florian)
*** Original post on bio 1521 at 2012-09-29 04:48:03 UTC ***

(In reply to comment #2)
> I think I have found the cause of this behavior in mozilla-central. When the
> listbox controls focus, the currentIndex gets changed for some reason.
> 
> http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/listbox.xml#602
> 
> Since we have a visible row at index 0, focus() sets currentIndex to zero, and
> the following keydown stroke increments it to 1. I am not sure whether this is
> a bug or not; I can't think of a reason why this happens, but there must be
> some purpose behind it.

Do you think this is worth filing a (Mozilla) bug about? Worst they say is that it is working as intended.
Comment on attachment 8353686 [details] [diff] [review]
Work around the listbox focus behavior

*** Original change on bio 1521 attmnt 1930 at 2012-10-02 21:48:53 UTC ***

I think the default behavior of the binding makes some sense; it's just in our way, so overriding it is OK with me. Thanks for looking at this! :)
Attachment #8353686 - Flags: review?(florian) → review+
*** Original post on bio 1521 at 2012-10-02 22:25:57 UTC ***

Thanks! :)

http://hg.instantbird.org/instantbird/rev/293ceab070fe
Assignee: nobody → wnayes
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3
You need to log in before you can comment on or make changes to this bug.