'available profiles' label can be 'deleted' by user

RESOLVED FIXED

Status

--
minor
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: mc_legolas, Assigned: Stefan.Borggraefe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016

On Mozilla 1.2 and 1.2b, if I delete all available profiles, then click the
delete button again, the 'available profiles' label above the list box disappears.

Reproducible: Always

Steps to Reproduce:
1.  start profile manager.
2.  delete all profiles (removing files for that profile or not)
3.  click the delete button again.

Actual Results:  
the 'available profiles' label disappears.

Expected Results:  
It shouldn't have removed a part of the interface, when clicking the delete button.
(Reporter)

Updated

16 years ago
Severity: normal → minor

Comment 1

16 years ago
confirming with mozilla 1.2b and 1202 trunk build
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 2

16 years ago
confirming with 1.3 release.

Comment 3

15 years ago
Well this is still present in 1.7b.
(Assignee)

Comment 4

15 years ago
*** Bug 241711 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 5

15 years ago
Also happens on Linux with a 1.8a build from yesterday.

The following JavaScript exception is thrown when the Listbox header disappears: 

JavaScript error: , line 0: uncaught exception: [Exception... "Component
returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[nsIListBoxObject.getIndexOfItem]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)" 
location: "JS frame :: chrome://global/content/bindings/listbox.xml ::
ensureElementIsVisible :: line 476"  data: no]
OS: Windows 2000 → All
(Assignee)

Comment 6

15 years ago
Created attachment 147116 [details] [diff] [review]
Fixes the bug

This happens because DeleteProfile uses
  selected.previousSibling;
instead of
  profileList.getPreviousItem(selected, 1);
to get the listitem to select after the profile deletion.

selected.previousSibling returns the listbox header when the last profile is
deleted, while getProviousItem() return null when there are no more listitems.

The patch also moves the selection of the previous listitem inside the
try-block so this only happens when the profile deletion was actually
successful.
(Assignee)

Updated

15 years ago
Assignee: jag → Stefan.Borggraefe
Status: NEW → ASSIGNED
(Assignee)

Updated

15 years ago
Attachment #147116 - Flags: review?(jag)

Comment 7

15 years ago
Comment on attachment 147116 [details] [diff] [review]
Fixes the bug

The fix itself looks good.

Someone might object to the change in white space style though. Seeing how this
file is a rather ugly mix of two styles, I'm more than happy to say yes to
these whitespace changes, though the majority style seems to be the one you're
actually moving away from. Hmmm... Who owns this stuff anyway? I'd say run it
by them, but you have my blessing. r=jag
Attachment #147116 - Flags: review?(jag) → review+
(Assignee)

Comment 8

15 years ago
Conrad: Seems like you are the only Profile Manager peer currently available.
Are you ok with my whitespace changes or should I revert them? I could also fix
the whole file to use one style before checkin.
(Assignee)

Comment 9

15 years ago
Comment on attachment 147116 [details] [diff] [review]
Fixes the bug

Lets ask a super-reviewer before I forget about this patch. ;-)

Alec: Are you ok with the whitespace usage in my patch? Should I perhaps change
the whitespace usage in the whole file to be consistent before checkin?
Attachment #147116 - Flags: superreview?(alecf)

Comment 10

15 years ago
Comment on attachment 147116 [details] [diff] [review]
Fixes the bug

sr=alecf
Attachment #147116 - Flags: superreview?(alecf) → superreview+
(Assignee)

Comment 11

15 years ago
fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.