Closed
Bug 237776
Opened 21 years ago
Closed 20 years ago
Reload should be disabled for blank tabs
Categories
(Firefox :: Toolbars and Customization, defect)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
FIXED
People
(Reporter: mozilla, Assigned: RyanVM)
References
Details
(Keywords: polish)
Attachments
(1 file, 7 obsolete files)
13.91 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7b) Gecko/20040314 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7b) Gecko/20040314 Firefox/0.8.0+
If a tab is blank, the Reload button has no function; so it should be disabled.
Reproducible: Always
Steps to Reproduce:
1.Open a blank tab
2.
3.
Actual Results:
The Reload button is available, but does nothing
Expected Results:
The button should be disabled
Updated•21 years ago
|
Severity: normal → minor
Reporter | ||
Updated•21 years ago
|
Flags: blocking1.0?
Comment 2•21 years ago
|
||
it reloads about:blank :)
Comment 3•21 years ago
|
||
PMFJI.
Along the same lines, what about the "File" menu items?
Save Page As, Send Page, Print Preview, Print
I believe all of them should be disabled on a blank tab.
Should I open a new bug for it?
Assignee | ||
Comment 5•20 years ago
|
||
It does look a bit silly in my opinion.
Assignee | ||
Comment 6•20 years ago
|
||
I'd like to take a stab at this bug, but I'm not even sure where these settings
are controlled.
Comment 7•20 years ago
|
||
Resummarizing so we don't fix this halfway:
Reload menu/context menu items should be disabled as well, as should the
keyboard command. Using reload to match the stopCommand, and making the
keyboard shortcut and the UI elements all key off of that is the right fix.
Summary: Reload button should be disabled for blank tabs → Reload should be disabled for blank tabs
Assignee | ||
Comment 8•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #171291 -
Flags: review?(mconners)
Assignee | ||
Updated•20 years ago
|
Attachment #171291 -
Flags: review?(mconners) → review?(mconnor)
Assignee | ||
Comment 9•20 years ago
|
||
Attachment #171291 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #171291 -
Flags: review?(mconnor)
Assignee | ||
Updated•20 years ago
|
Attachment #171297 -
Flags: review?(mconnor)
Assignee | ||
Comment 10•20 years ago
|
||
Comment on attachment 171297 [details] [diff] [review]
Same patch with -up8
Obsoleting this patch until the patch from bug 273217 is checked in.
Attachment #171297 -
Attachment is obsolete: true
Attachment #171297 -
Flags: review?(mconnor)
Updated•20 years ago
|
Assignee: bugs → ryanvm
Assignee | ||
Comment 12•20 years ago
|
||
Comment on attachment 172302 [details] [diff] [review]
Updated patch
Cripes, there's some extra garbage that I accidentally let get in there.
Resubmitting.
Attachment #172302 -
Attachment is obsolete: true
Attachment #172302 -
Flags: review?(mconnor)
Assignee | ||
Comment 13•20 years ago
|
||
Attachment #172350 -
Flags: review?(mconnor)
Comment 14•20 years ago
|
||
Comment on attachment 172350 [details] [diff] [review]
Updated patch with no extra garbage
clearing review request, new patch is supposed to be coming :)
Attachment #172350 -
Flags: review?(mconnor)
Assignee | ||
Comment 15•20 years ago
|
||
OK, I've updated this patch to fix the issue with the last one where Ctrl+F5
functionality was broken. It's also diff'ed vs. the current trunk, so it should
patch with less complaining.
Attachment #172350 -
Attachment is obsolete: true
Attachment #175522 -
Flags: review?(mconnor)
Comment 16•20 years ago
|
||
Comment on attachment 175522 [details] [diff] [review]
New patch. Doesn't break Ctrl+F5 functionality.
>+ this.stopCommand = document.getElementById("Browser:Stop");
>+ this.reloadCommand = document.getElementById("Browser:Reload");
>+ this.reloadCommandSkipCache = document.getElementById("Browser:ReloadSkipCache");
this.reloadSkipCacheCommand instead :)
>+ this.stopCommand = null;
>+ this.reloadCommand = null;
>+ this.reloadCommandSkipCache = null;
same here
>@@ -3109,16 +3113,25 @@ nsBrowserStatusHandler.prototype =
> selectedBrowser.lastURI = aLocation;
>
> this.setOverLink("", null);
>
> var location = aLocation.spec;
>
> if (location == "about:blank")
> location = "";
>+
>+ this.reloadCommand.removeAttribute("disabled");
>+ this.reloadCommandSkipCache.removeAttribute("disabled");
>+
>+ // Disable reload button on blank pages
>+ if (location == "") {
>+ this.reloadCommand.setAttribute("disabled", "true");
>+ this.reloadCommandSkipCache.setAttribute("disabled", "true");
>+ }
why remove the attribute only to set it again? and why check a second time for
the about:blank check?
if (location == "about:blank") {
location = "";
this.reloadCommand.setAttribute("disabled", "true");
this.reloadCommandSkipCache.setAttribute("disabled", "true");
} else {
this.reloadCommand.removeAttribute("disabled");
this.reloadCommandSkipCache.removeAttribute("disabled");
}
don't forget to rename the command too :)
>Index: browser-sets.inc
>===================================================================
>RCS file: /cvsroot/mozilla/browser/base/content/browser-sets.inc,v
>retrieving revision 1.35
>diff -u -p -8 -r1.35 browser-sets.inc
>--- browser-sets.inc 1 Feb 2005 17:36:48 -0000 1.35
>+++ browser-sets.inc 25 Feb 2005 06:51:55 -0000
>@@ -275,20 +276,20 @@
> <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="accel"/>
> <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="accel"/>
> #else
> <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
> <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
> #endif
> <key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
> <key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
>- <key keycode="VK_F5" oncommand="BrowserReload();"/>
>- <key keycode="VK_F5" modifiers="accel" oncommand="BrowserReloadSkipCache();"/>
>- <key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
>- <key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
>+ <key keycode="VK_F5" command="Browser:Reload"/>
>+ <key keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/>
>+ <key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel" id="key_reload"/>
>+ <key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel,shift"/>
why isn't this Browser:ReloadSkipCache directly? You know its going there, why
mess with redirection and event checking?
almost! ;)
Attachment #175522 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 17•20 years ago
|
||
This patch encompasses the changes Mike suggested in his review of the patch.
One minor issue I've run into, however, is that the reload button doesn't get
disabled on browser startup if the default homepage is about:blank. If you then
hit the Home button, though, the reload button disables.
If anyone reading this has an idea of what needs to be done to fix that, please
let me know.
Attachment #175522 -
Attachment is obsolete: true
Attachment #175689 -
Flags: review?(mconnor)
Assignee | ||
Comment 18•20 years ago
|
||
Gah, I figured out the problem. It's fixed in this patch.
Do your worst, Mike :)
Attachment #175689 -
Attachment is obsolete: true
Attachment #175690 -
Flags: review?(mconnor)
Assignee | ||
Updated•20 years ago
|
Attachment #175689 -
Flags: review?(mconnor)
Assignee | ||
Updated•20 years ago
|
Attachment #175690 -
Attachment is obsolete: true
Attachment #175690 -
Flags: review?(mconnor)
Assignee | ||
Comment 19•20 years ago
|
||
Just realized that I forgot to add the functions to the disabled entries list
in browser.js. This remedies that.
OK, I swear I'm done submitting patches until I get a review :P
Attachment #175692 -
Flags: review?(mconnor)
Updated•20 years ago
|
Attachment #175692 -
Flags: review?(mconnor) → review+
Comment 20•20 years ago
|
||
Comment on attachment 175692 [details] [diff] [review]
Adding missing entries to disabled items list in browser.js (Checked in)
Checking in browser.js;
/cvsroot/mozilla/browser/base/content/browser.js,v <-- browser.js
new revision: 1.390; previous revision: 1.389
done
Checking in browser.xul;
/cvsroot/mozilla/browser/base/content/browser.xul,v <-- browser.xul
new revision: 1.257; previous revision: 1.256
done
Checking in browser-context.inc;
/cvsroot/mozilla/browser/base/content/browser-context.inc,v <--
browser-context.inc
new revision: 1.11; previous revision: 1.10
done
Checking in browser-menubar.inc;
/cvsroot/mozilla/browser/base/content/browser-menubar.inc,v <--
browser-menubar.inc
new revision: 1.44; previous revision: 1.43
done
Checking in browser-sets.inc;
/cvsroot/mozilla/browser/base/content/browser-sets.inc,v <-- browser-sets.inc
new revision: 1.38; previous revision: 1.37
done
Attachment #175692 -
Attachment description: Adding missing entries to disabled items list in browser.js → Adding missing entries to disabled items list in browser.js (Checked in)
Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 21•20 years ago
|
||
regression: bug 284130.
Comment 22•20 years ago
|
||
bug 287105 is regressed by this bug fix....
Comment 23•20 years ago
|
||
This patch looks wrong to me, since onLocationChange for subframes will end up
in this method. Shouldn't that new code be inside the |if
(aWebProgress.DOMWindow == content)| block or something?
Comment 24•20 years ago
|
||
Note that even after bug 285738 is fixed, we still need to fix the code that was
checked in here. Let me know if you want me to file a bug on this, please.
Assignee | ||
Comment 25•20 years ago
|
||
(In reply to comment #24)
> Note that even after bug 285738 is fixed, we still need to fix the code that was
> checked in here. Let me know if you want me to file a bug on this, please.
Can we just reopen this bug?
Comment 26•20 years ago
|
||
One bug per problem... The fact that the code is broken for frames is a separate
problem. So that was actually a question as to whether you were going to file
the bug yourself.
Bug 288160 filed.
Depends on: 288160
Updated•20 years ago
|
Updated•20 years ago
|
Updated•18 years ago
|
QA Contact: bugzilla → toolbars
You need to log in
before you can comment on or make changes to this bug.
Description
•