Closed Bug 522769 Opened 15 years ago Closed 15 years ago

XUL tree widget can call tree view setCellText multiple times

Categories

(Toolkit :: UI Widgets, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: erik.staats, Assigned: erik.staats)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.14) Gecko/2009082706 Firefox/3.0.14
Build Identifier: Songbird 1.5.0a build 1321

In the XUL tree widget stopEditing method, stopEditing may be reentered via the call to setCellText.  Since this._editingColumn is not cleared until after stopEditing is called, stopEditing can be called a second time.

In the case of the Songbird filter pane widget's use of the XUL tree widget, setCellText sends a request to a thread and waits for the result, processing the event queue in the meantime.  Another UI event is on the queue that causes stopEditing to be called again.

If the text change causes a change in the filter results, the tree rows will change and the second call to setCellText will target the incorrect item.  However, it shouldn't be called a second time.


Reproducible: Sometimes

Steps to Reproduce:
STR
1) Launch Songbird 1.5 build 1321.
2) Import music from multiple artists.
3) Select one of the artists in the artist filter pane.
4) Change the artist name in one of the tracks.


Actual Results:  
Artist name changed in selected track plus an additional track from different
artist.


Expected Results:  
Artist name changed in only one track.


See http://bugzilla.songbirdnest.com/show_bug.cgi?id=18399
Attachment #406745 - Attachment is obsolete: true
Comment on attachment 406746 [details] [diff] [review]
Changed the XUL tree widget to clear _editingColumn before calling setCellText in stopEditing.

Per Mook's suggestion.
Attachment #406746 - Flags: review?(enndeakin)
Attachment #406746 - Flags: review?(enndeakin) → review+
Comment on attachment 406746 [details] [diff] [review]
Changed the XUL tree widget to clear _editingColumn before calling setCellText in stopEditing.

Songbird is looking to migrate to the 1.9.2 branch from 1.9.0 and would like to not have to maintain this patch locally
Attachment #406746 - Flags: approval1.9.2?
Blocks: songbird
This can already land on trunk however.
Keywords: checkin-needed
Assignee: nobody → erik.staats
http://hg.mozilla.org/mozilla-central/rev/64994a873a48
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Component: XUL → XUL Widgets
Keywords: checkin-needed
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → xul.widgets
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Comment on attachment 406746 [details] [diff] [review]
Changed the XUL tree widget to clear _editingColumn before calling setCellText in stopEditing.

approval1.9.2 requests aren't currently being monitored, since we're nearing RC freeze and there are too many outstanding requests, so I'm clearing this request. Feel free to re-request approval if you are confident that it's worth drivers' time to consider whether this non-blocker needs to land for 1.9.2 at this stage.
Attachment #406746 - Flags: approval1.9.2?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: