Closed Bug 361694 Opened 18 years ago Closed 18 years ago

Altering a tag's importance resets its name and colour

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey1.1final

People

(Reporter: neil, Assigned: mnyromyr)

References

Details

(Keywords: fixed-seamonkey1.1, fixed1.8.1.1)

Attachments

(3 files, 2 obsolete files)

Steps to reproduce problem:
1. Change the name and colour of a tag
2. Make it more or less importnant

Actual result: tag name and colour is reset to its original value

Workaround: change tag importance first, or switch pref panes
Assignee: prefs → mnyromyr
Attached patch trunk patchSplinter Review
Read the possibly changed values before moving the elements.
Attachment #246484 - Flags: superreview?(neil)
Attachment #246484 - Flags: review?(neil)
Attached patch 1.8 branch patch (obsolete) — Splinter Review
Same as the trunk patch, but with an additional fix for a focus loss when moving the listitems.
Attachment #246485 - Flags: superreview?(neil)
Attachment #246485 - Flags: review?(neil)
Attachment #246484 - Flags: superreview?(neil)
Attachment #246484 - Flags: superreview+
Attachment #246484 - Flags: review?(neil)
Attachment #246484 - Flags: review+
Comment on attachment 246485 [details] [diff] [review]
1.8 branch patch

> function FocusTagEntry(aEntry)
> {
>+  OnFocus({target: aEntry});
>   // focus the entry's textbox
>   gTagList.ensureElementIsVisible(aEntry);
>   aEntry.firstChild.firstChild.focus();
> }
This is wrong for two reasons:
a) it fixes the the focus loss before it was supposed to happen
b) replicating the focus event itself isn't the correct fix,
   the correct fix is to replicate the effect of the event handler.
Attachment #246485 - Flags: superreview?(neil)
Attachment #246485 - Flags: superreview-
Attachment #246485 - Flags: review?(neil)
Landed trunk fix.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attached patch 1.8 branch patch, v2 (obsolete) — Splinter Review
> >+  OnFocus({target: aEntry});
> >   // focus the entry's textbox
> >   gTagList.ensureElementIsVisible(aEntry);
> >   aEntry.firstChild.firstChild.focus();
> > }
> This is wrong for two reasons:
> a) it fixes the the focus loss before it was supposed to happen

Uh? The focus loss of the listbox happens when MoveTag calls .insertBefore to move the listitem (just like on trunk). Only on trunk, the textbox' .focus() call in FocusTagEntry will select the listitem, but doesn't on branch.

> b) replicating the focus event itself isn't the correct fix,
>    the correct fix is to replicate the effect of the event handler.

Yeah. Here's a less hackier version, just doing the missing listitem selection before focussing the textbox.
Attachment #246533 - Flags: superreview?(neil)
Attachment #246533 - Flags: review?(neil)
Attachment #246485 - Attachment is obsolete: true
Comment on attachment 246533 [details] [diff] [review]
1.8 branch patch, v2

Sorry I forgot to debug this before, and smaug didn't answer his memo, but the actual problem is that removing the element from the dom kills the listener.
Attachment #246533 - Flags: superreview?(neil)
Attachment #246533 - Flags: review?(neil)
Attachment #246533 - Flags: review-
- recreate the lost event listener
- fix missing label/color update for items not in view
- fix button id typo in .xul
Attachment #246533 - Attachment is obsolete: true
Attachment #246539 - Flags: superreview?(neil)
Attachment #246539 - Flags: review?(neil)
Comment on attachment 246539 [details] [diff] [review]
1.8 branch patch, v3

Also to move the call to UpdateTagEntry on the trunk (we could land that with the onfocus comments and optimization patch if you like).
Attachment #246539 - Flags: superreview?(neil)
Attachment #246539 - Flags: superreview+
Attachment #246539 - Flags: review?(neil)
Attachment #246539 - Flags: review+
Attachment #246539 - Flags: approval-seamonkey1.1?
Landed additional fixes (moved call, .xul id) on trunk as per comment #8.
Attachment #246617 - Flags: superreview+
Attachment #246617 - Flags: review+
Comment on attachment 246539 [details] [diff] [review]
1.8 branch patch, v3

first-a=me for SeaMonkey 1.1, one more needed
Attachment #246539 - Flags: approval-seamonkey1.1? → approval-seamonkey1.1+
Landed on MOZILLA_1_8_BRANCH.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: