Closed Bug 79769 Opened 23 years ago Closed 22 years ago

Application input field on helper app dialog should be disabled on Mac

Categories

(Core Graveyard :: File Handling, defect, P3)

PowerPC
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0.1

People

(Reporter: law, Assigned: pkwarren)

References

Details

(Keywords: platform-parity)

Attachments

(1 file, 2 obsolete files)

The spec for the new helper app dialog specifies that the application name input
field should be disabled on the Macintosh.  It is not, thereby
enabling/tempting/tricking/? Mac users into entering path names rather than
pressing the "Choose..." button.

We need to determine that Mozilla is running on a Mac and disable this field.
Note that this flaw is also exhibited by the "New Type" and "Edit Type" helper
app prefs dialogs.
*** Bug 79847 has been marked as a duplicate of this bug. ***
Keywords: pp
Depends on: 78106
No longer depends on: 78106
Blocks: 78106
marking p3 and mozilla1.0
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Component: XP Apps → File Handling
moving to mozilla0.9.8
Target Milestone: mozilla1.0 → mozilla0.9.8
pushing out to mozilla1.0.1
Target Milestone: mozilla0.9.8 → mozilla1.0.1
->default owner
Assignee: pchen → law
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0.1 → ---
->target milestone it had
Target Milestone: --- → mozilla1.0.1
QA Contact: sairuh → petersen
This should be fixed (at least for some of the dialogs involved) now that bug
86640 landed.  Could someone please test?
Depends on: 86640
Keywords: qawanted
*** Bug 188949 has been marked as a duplicate of this bug. ***
Attached patch Fix (obsolete) — Splinter Review
Bug #86640 didn't fix this completely. We need to disable it explicitly in the
toggleChoice function which is called when radio elements are clicked. This
should fix this problem.
Comment on attachment 111433 [details] [diff] [review]
Fix

>     toggleChoice : function () {
>         // See what option is selected.
>         this.dialogElement( "chooseApp" ).disabled = 
>             this.dialogElement( "appPath" ).disabled = !this.dialogElement( "openUsing" ).selected;
>+
>+        // If we're running on the Mac, disable the application <textbox>.
>+        if ( this.mDialog.navigator.platform.indexOf( "Mac" ) != -1 ) {
>+            this.dialogElement( "appPath" ).disabled = true;
>+        }

this.dialogElement("appPath").disabled is getting set twice, so it could get
set from true and then false unnecessarily.
That's making unnecessary work for reflow. Don't know if it would flash from
non-disabled to disabled state each time.

Anyway, it would be cleaner to just set that at most 1 time for each call of
toggleChoice.
Fix that, and r=aaronl
Attachment #111433 - Flags: review+
Comment on attachment 111433 [details] [diff] [review]
Fix

sr=bzbarsky if aaronl's issue is fixed.
Attachment #111433 - Flags: superreview+
Taking ownership of bug.
Assignee: law → pkw
Attached patch Updated patch (obsolete) — Splinter Review
Only sets the disabled value once for each element. This patch has been updated
to work with changes made in Bug 188931 (uses the mIsMac variable).
Attachment #111433 - Attachment is obsolete: true
Attachment #111563 - Flags: superreview?(bzbarsky)
Attachment #111563 - Flags: review?(aaronl)
Attachment #111563 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 111563 [details] [diff] [review]
Updated patch

if ( !this.mIsMac ) {
+		 this.dialogElement( "appPath" ).disabled = false;
How about this.dialogElement"appPath" ).disabled = this.mIsMac;
Attachment #111563 - Flags: superreview+ → superreview?(bzbarsky)
+        if ( this.dialogElement( "openUsing" ).selected ) {
+            
+            // Enable chooseApp button
+            this.dialogElement( "chooseApp" ).disabled = false;
+            
+            // Enable the application <textbox> if we are not on a Mac
+            if ( !this.mIsMac ) {
+                this.dialogElement( "appPath" ).disabled = false;
+            }
+        }
+        else {
+            this.dialogElement( "chooseApp" ).disabled = true;
+            this.dialogElement( "appPath" ).disabled = true;
+        }
var openUsing = this.dialogElement( "openUsing" ).selected;
this.dialogElement( "chooseApp" ).disabled = !openUsing;
this.dialogElement( "appPath" ).disabled = !openUsing || this.isMac;

Attachment #111563 - Attachment is obsolete: true
Attachment #111567 - Flags: superreview?(bzbarsky)
Attachment #111567 - Flags: review?(aaronl)
Comment on attachment 111567 [details] [diff] [review]
Use aaron's suggestion

r=aaronl
Attachment #111567 - Flags: review?(aaronl) → review+
Attachment #111567 - Flags: superreview?(bzbarsky) → superreview+
Fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Verified in the 2003-01-15-08 trunk build under 10.2.3.
Status: RESOLVED → VERIFIED
Attachment #111563 - Flags: superreview?(bzbarsky)
Attachment #111563 - Flags: review?(aaronl)
Keywords: qawanted
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: