Add keyboard modifier to start in safe mode for windows

VERIFIED FIXED in mozilla2.0b8

Status

()

Toolkit
Startup and Profile System
VERIFIED FIXED
7 years ago
5 years ago

People

(Reporter: rstrong, Assigned: rstrong)

Tracking

({relnote, user-doc-needed})

Trunk
mozilla2.0b8
x86
Windows 7
relnote, user-doc-needed
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

Attachments

(1 attachment, 3 obsolete attachments)

Similar to what was implemented for Mac OS X.
Blocks: 598779
What about Linux?
(In reply to comment #1)
> What about Linux?
Please file a separate bug
Blocks: 602566
No longer blocks: 602566
note: bug 311466 added this for Mac OS X
Created attachment 488621 [details] [diff] [review]
patch rev1
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #488621 - Flags: review?(dtownsend)
Created attachment 488626 [details] [diff] [review]
patch rev2

no value in checking the current value of gSafeMode and this makes it consistent with the Mac implementation
Attachment #488621 - Attachment is obsolete: true
Attachment #488626 - Flags: review?(dtownsend)
Attachment #488621 - Flags: review?(dtownsend)
Comment on attachment 488626 [details] [diff] [review]
patch rev2

Alex, are you ok with using the ctrl key as the modifier to launch in safe mode on Windows?
Attachment #488626 - Flags: ui-review?(faaborg)
Comment on attachment 488626 [details] [diff] [review]
patch rev2

Jim, running this by you since you might now of issues I don't with doing this. Thanks!
Attachment #488626 - Flags: review?(jmathies)
Comment on attachment 488626 [details] [diff] [review]
patch rev2

I think we should go with shift on windows (and possibly add it for consistency on the other platforms in addition to option).  Main reason is that it is easier to find than control (very novice users won't be familiar with alt/control since you don't really have to use those keys), and additionally there is some limited platform consistency with using shift in this way:

>Microsoft uses _shift_ to bypass startup routines/macros for Office Apps and to
>bypass Windows Startup programs.
https://bugzilla.mozilla.org/show_bug.cgi?id=542122#c14
Attachment #488626 - Flags: ui-review?(faaborg) → ui-review-
Created attachment 488627 [details] [diff] [review]
patch rev3 - use shift

Filed Bug 610086 for changing the Mac OS X modifier

Commented in bug 602566 that the modifier should be the shift key

Carrying forward ui-r+
Attachment #488626 - Attachment is obsolete: true
Attachment #488627 - Flags: ui-review+
Attachment #488627 - Flags: review?(dtownsend)
Attachment #488627 - Flags: feedback?(jmathies)
Attachment #488626 - Flags: review?(jmathies)
Attachment #488626 - Flags: review?(dtownsend)

Comment 10

7 years ago
(In reply to comment #7)
> Comment on attachment 488626 [details] [diff] [review]
> patch rev2
> 
> Jim, running this by you since you might now of issues I don't with doing this.
> Thanks!

I would add a comment explaining what this code does.

There's a chance that users might trigger this mistakenly, do we notify users when entering private mode so they understand what's going on?
Attachment #488627 - Flags: review?(dtownsend) → review+
(In reply to comment #10)
> (In reply to comment #7)
> > Comment on attachment 488626 [details] [diff] [review] [details]
> > patch rev2
> > 
> > Jim, running this by you since you might now of issues I don't with doing this.
> > Thanks!
> 
> I would add a comment explaining what this code does.
Sure

> There's a chance that users might trigger this mistakenly, do we notify users
> when entering private mode so they understand what's going on?

It does... it displays the safe mode ui with the safe mode options.
blocking2.0: --- → betaN+
Created attachment 489266 [details] [diff] [review]
patch updated to comments

Carrying forward ui-r and r.

Jim, is this comment adequate?
Attachment #488627 - Attachment is obsolete: true
Attachment #489266 - Flags: ui-review+
Attachment #489266 - Flags: review+
Attachment #489266 - Flags: feedback?(jmathies)
Attachment #488627 - Flags: feedback?(jmathies)

Comment 13

7 years ago
(In reply to comment #12)
> Created attachment 489266 [details] [diff] [review]
> patch updated to comments
> 
> Carrying forward ui-r and r.
> 
> Jim, is this comment adequate?

yeah I'd say that covers it. :)

Updated

7 years ago
Attachment #489266 - Flags: feedback?(jmathies) → feedback+
Pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/c5fb2f1485cd
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Flags: in-testsuite-
Flags: in-litmus?
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Man, this is slick! \o/  V. Fixed.

Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101118 Firefox/4.0b8pre ID:20101118191737
Status: RESOLVED → VERIFIED
Keywords: user-doc-needed

Comment 16

7 years ago
This interferes with some Windows functionality.  I specify a hot key
Ctrl+Shift+N in the Firefox shortcut properties and use that key to launch it. 
As of Beta 8, using that shortcut starts Firefox in safe mode.  The Shift key
is also used in Windows to launch a program minimized, so holding Shift and
clicking a Firefox shortcut starts it in safe mode but minimized.  Is there at
least a way to disable this behavior?

Comment 17

7 years ago
Created Bug 619866.

Updated

7 years ago
Depends on: 619866
I have the same issue. Using both Ctrl + Shift + ... makes for a suitable Global Hotkey. 
If Shift is to be used could there at least be an option to deactivate it or, better yet, to have it user defined?
(In reply to comment #18)
> I have the same issue. Using both Ctrl + Shift + ... makes for a suitable
> Global Hotkey. 
> If Shift is to be used could there at least be an option to deactivate it or,
> better yet, to have it user defined?
See Bug 619866 - it is fixed for the next beta and in the nightly builds.
Keywords: relnote

Comment 20

6 years ago
Would you consider adding a setting to allow this behavior to be disabled?

Although it's useful for regular users, it is bit of a problem for those of us who automatically run browser tests with Firefox using tools such as selenium-webdriver.  As the tests run Firefox gets opened up a number of times automatically, in the background, during which time many developers carry on editing their work or checking their email or what have you.

But if it happens that they have the shift key down at one of the times when a new Firefox instance is started, then it will start in safe mode, which of course doesn't work with the browser control mechanisms that these tools use.

So again, perfectly reasonable for the default behavior, but it'd be great if we could supply a profile setting to bypass this, much as we supply profile settings to turn off various UI prompts and warnings (browser.tabs.warnOnClose and security.warn_entering_secure for example).

Comment 21

6 years ago
That's a good point, and you already have my vote.  Although the situation was improved so that it has to be the Shift key alone without Ctrl or Alt, my Ctrl+Shift+N hot key still triggers safe mode about 10% of the time if I happen to release Ctrl a fraction of a second before Shift.  I don't see any harm in providing a hidden setting to disable the Shift key modifier while still allowing -safe-mode from the command line.
The shift key check is currently done early during startup before profile selection. If someone wanted to add this functionality, filed a bug, provided a patch, and it didn't hurt startup performance which it most likely wouldn't I highly suspect the patch would be accepted. I definitely won't have time to look at implementing that in the foreseeable future.
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.