Closed Bug 304879 Opened 19 years ago Closed 19 years ago

regression: commonDialog's default button code doesn't work anymore

Categories

(Core :: XUL, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: asaf, Assigned: asaf)

References

Details

(Keywords: fixed1.8, regression)

Attachments

(1 file, 1 obsolete file)

commonDialog's default button code doesn't seem to work anymore. see bug 300227 comment 3
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.8beta4
Flags: blocking1.8b4?
Attached patch patch (toolkit & xpfe) (obsolete) (deleted) — Splinter Review
Attachment #192861 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #192861 - Flags: review?(mconnor)
Should this be "accept"? if (dButton != "accpet")
yeah, typo.
Comment on attachment 192861 [details] [diff] [review] patch (toolkit & xpfe) > switch (defaultButton) { > case 3: >- dButton = document.documentElement.getButton("extra2"); >+ dButton = "extra2"; > break; > case 2: >- dButton = document.documentElement.getButton("extra1"); >+ dButton = "extra1"; > break; > case 1: >- dButton = document.documentElement.getButton("cancel"); >+ dButton = "cancel"; > break; > default: > case 0: >- dButton = document.documentElement.getButton("accept"); >+ dButton = "accept"; > break; > } This switch could probably be simplified into an array lookup (nsPromptService.cpp only passes values of 0 to 3). >+ // Set the default button if necessary >+ if (dButton != "accpet") I don't see the point of this extra condition, are we really going to affect the performance of launching a dialog by that much?
Attachment #192861 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment on attachment 192861 [details] [diff] [review] patch (toolkit & xpfe) leaving it as a switch is fine, but the second part should be addressed
Attachment #192861 - Flags: review?(mconnor) → review+
Attachment #192861 - Flags: approval1.8b4?
plussing, has patch with r+sr, just needs review, and is a regression
Flags: blocking1.8b4? → blocking1.8b4+
Attachment #192861 - Flags: approval1.8b4? → approval1.8b4+
Attached patch patch for checkin (deleted) — Splinter Review
Attachment #192861 - Attachment is obsolete: true
Trunk: Checking in toolkit/content/commonDialog.js; /cvsroot/mozilla/toolkit/content/commonDialog.js,v <-- commonDialog.js new revision: 1.10; previous revision: 1.9 done Checking in xpfe/global/resources/content/commonDialog.js; /cvsroot/mozilla/xpfe/global/resources/content/commonDialog.js,v <-- commonDialog.js new revision: 1.57; previous revision: 1.56 done 1.8 Branch: Checking in toolkit/content/commonDialog.js; /cvsroot/mozilla/toolkit/content/commonDialog.js,v <-- commonDialog.js new revision: 1.9.2.1; previous revision: 1.9 done Checking in xpfe/global/resources/content/commonDialog.js; /cvsroot/mozilla/xpfe/global/resources/content/commonDialog.js,v <-- commonDialog.js new revision: 1.56.8.1; previous revision: 1.56 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Depends on: 284776
Keywords: fixed1.8
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: