Closed Bug 953624 Opened 10 years ago Closed 10 years ago

focus the connect/disconnect button automatically

Categories

(Instantbird Graveyard :: Account manager, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: romain)

References

Details

Attachments

(1 file, 2 obsolete files)

*** Original post on bio 177 at 2009-04-24 20:36:00 UTC ***

The connect/disconnect button is the one people are the more likely to want to use when they select an account. It should be automatically focused when the account gets focused, so that a simple key press of the spacebar do the action.
Blocks: 953623
Attached patch Patch V1 (obsolete) — Splinter Review
*** Original post on bio 177 as attmnt 151 at 2009-07-31 18:18:00 UTC ***

I first tried to handle a "focus" event in the binding, but without any success (the function is not called at all !).
I then tried the "onselect" on the richlistbox, but it had a very strange behavior, by scrolling the box by itself (on loading) so that the buttons are on the top of visible area, and it didn't focus the button when selecting an other account.

So I tried debugging and tried also with a alert before the focus, and it worked ... so I used the same hack as seen earlier in the file (setTimeout(...., 0)).
And it works pretty well, but it's still a bit dirty :(.
Attachment #8351895 - Flags: review?(florian)
Assignee: nobody → romain
Status: NEW → ASSIGNED
Attached patch Patch V2 (obsolete) — Splinter Review
*** Original post on bio 177 as attmnt 152 at 2009-07-31 18:22:00 UTC ***

I forgot to save a file ...
And it allows me to add  that I also tried to handle this with event.preventDefault() and event.stopPropagation() without more success.

Sorry for the spam :)
Attachment #8351896 - Flags: review?(florian)
Comment on attachment 8351895 [details] [diff] [review]
Patch V1

*** Original change on bio 177 attmnt 151 at 2009-07-31 18:22:11 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351895 - Attachment is obsolete: true
Attachment #8351895 - Flags: review?(florian)
Attached patch Patch V3Splinter Review
*** Original post on bio 177 as attmnt 153 at 2009-07-31 22:29:00 UTC ***

Coding style fixes.

This patch will need to be included in Bug 953625 (bio 178), and pushed with it.
Attachment #8351897 - Flags: review?(florian)
Comment on attachment 8351896 [details] [diff] [review]
Patch V2

*** Original change on bio 177 attmnt 152 at 2009-07-31 22:29:03 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351896 - Attachment is obsolete: true
Attachment #8351896 - Flags: review?(florian)
Comment on attachment 8351896 [details] [diff] [review]
Patch V2

*** Original change on bio 177 attmnt 152 at 2009-07-31 22:30:52 UTC ***

r=me with a few comments given on IRC addressed, mostly the comment about the
hack to improve to at least include this bug's number, coding style nits about
the anonymous JS function, and I would like the 'focus' variable name to be
changed to be more descriptive.
Attachment #8351896 - Flags: review+
Comment on attachment 8351897 [details] [diff] [review]
Patch V3

*** Original change on bio 177 attmnt 153 at 2009-07-31 22:32:26 UTC ***

Thanks!
Attachment #8351897 - Flags: review?(florian) → review+
*** Original post on bio 177 at 2009-08-02 21:58:17 UTC ***

https://hg.instantbird.org/instantbird/rev/2030a20dacf6 is attachment 8351897 [details] [diff] [review] (bio-attmnt 153)
https://hg.instantbird.org/instantbird/rev/2ccaf97bc24c is attachment 8351900 [details] [diff] [review] (bio-attmnt 156), a follow up that I attached in bug 953625 (bio 178).
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.2b1
Depends on: 955340
You need to log in before you can comment on or make changes to this bug.