Closed Bug 102762 Opened 24 years ago Closed 24 years ago

Cancel does nothing in find dialog when no search text is provided

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: arnoudb, Assigned: simmo)

References

Details

(Keywords: access, regression)

Attachments

(3 files)

Build: 2001100203 on Win2k Hitting Cancel in the Find dialog does not close the dialog when there is no text in the textfield. Steps to reproduce: 1) Hit CTRL-F 2) Clear the textfield 3) Hit Cancel Result: Nothing happens Expected: Dialog gets closed. Once you have typed something in the textfield again, the Cancel button works again
2001100203 trunk, Windows 98. Seeing the same behavior.
linux/20011003 Seing this exact behaviour.
(reminder: bugs don't get fixed in Browser-General and definitely not when assigned to me). -->XP Apps
Assignee: asa → blakeross
Component: Browser-General → XP Apps: GUI Features
QA Contact: doronr → sairuh
regression, all platforms. ->joe? reassign if you're unable to fix soon. thx!
Assignee: blakeross → hewitt
OS: Windows 2000 → All
Hardware: PC → All
*** Bug 104106 has been marked as a duplicate of this bug. ***
->hyatt, while joe is away...
Assignee: hewitt → hyatt
*** Bug 104709 has been marked as a duplicate of this bug. ***
*** Bug 104751 has been marked as a duplicate of this bug. ***
*** Bug 104771 has been marked as a duplicate of this bug. ***
*** Bug 104782 has been marked as a duplicate of this bug. ***
Keywords: access
I see this also with the File Bookmark dialog. If you clear out the Location field, Cancel stops functioning. Looking at both of these behaviors, this may be a general bug with dialogs and not specific to Find. It appears that if the default button (Find for the Find dialog, OK for the File Bookmark dialog) is disabled then the Cancel button stops working. Cancel works in both the Text Zoom and Change Master Password dialogs when OK is disabled, but both of these are <window>s. Both findDialog.xul and addBookmark.xul use <dialog>. As hinted in the summary of bug 104782, this bug seems to surface only for <dialog>s.
Attached patch patch to fixSplinter Review
This patch fixes the Find dialog aswell as all the other dialogs such as the File Bookmark dialog. There just happened to be some code that stopped cancel being pushed if it the OK button was disabled. I put the cancel window.close() code outside the disabled OK/Find button checking code.
Comment on attachment 53549 [details] [diff] [review] patch to fix >+ if (aDlgType == "cancel") { >+ window.setTimeout(function() {window.close();}, 1); >+ } >+ /*perhaps*/ else >+ if (aDlgType == "accept") { /*\perhaps*/ > var button = this.getButton("accept"); > if (!button.disabled) { > var noCancel = this._fireButtonEvent(aDlgType); > > if (noCancel) { >- if (aDlgType == "accept" || aDlgType == "cancel") { > // calling window.close() while an oncommand event > // call is on the stack fails to close the window, > // so we need to do this ugly setTimeout hack
Also in this situation the dialog can't be dismissed <Esc> key.
The patch fixes it.
0.9.5 is out...could this be r/sr'd for checkin into the trunk? thx!
Lets not remove this line: - if (aDlgType == "accept" || aDlgType == "cancel") { Because otherwise clicking Help will cause the window to close. Just make the one line change at the top of the patch: - var button = this.getButton("accept"); + var button = this.getButton(aDlgType); sr=hewitt for that change only
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.6
Attached patch final patchSplinter Review
Comment on attachment 53855 [details] [diff] [review] final patch sr=hewitt
Attachment #53855 - Flags: superreview+
r=hyatt. --> hewitt
Assignee: hyatt → hewitt
Status: ASSIGNED → NEW
checking in
Assignee: hewitt → simm0
checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 105967 has been marked as a duplicate of this bug. ***
verifying that clicking cancel button now closes the Find dialog on Linux. Testing w/current CVS.
*** Bug 106395 has been marked as a duplicate of this bug. ***
verifying that this bug is now fixed.
Status: RESOLVED → VERIFIED
*** Bug 106688 has been marked as a duplicate of this bug. ***
Product: Core → Mozilla Application Suite
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: