Closed Bug 140119 Opened 22 years ago Closed 22 years ago

Ctrl+W doesn't close empty tabs

Categories

(SeaMonkey :: Tabbed Browser, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 72352

People

(Reporter: leifbrown, Assigned: jag+mozilla)

References

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417
BuildID:    2002041711

empty tabs cannot be closed by ctrl-t.

Reproducible: Always
Steps to Reproduce:
1.open tabbed browser
2.hit ctrl-t to open an empty tab
3.try to close with ctrl-t

Actual Results:  none.

Expected Results:  consistent UI -- ctrl-t should close tab regardless of content

right-clicking the tab and selecting "close tab" works fine, as does the
close-tab button
This may not be valid.
When you open a new tab, the focus goes into the URL bar and Ctrl+W in a text
field cuts one word back ...
ammend - description should read "ctrl-w doesn't close tabs".  ctrl-t opens
them.  I'm not just confused.
Leif, can you answer whether you were in the URL bar focus at the time ?

Control-W works fine on an empty tab.
Leif does the following work?

1)  Ctrl-t to open tab
2)  Click in content area
3)  Ctrl-w to close tab
or ctrl-t, ctrl-tab, ctrl-w
URL: (none)
This works fine for me for about:blank tabs, but for truly blank tabs (which
have a gray bakcground), no keyboard shortcuts work.

Steps to reproduce:
1. Go to http://www.squarefree.com/bookmarklets/webdevel.html
2. Middle+click on Validate.
3. Press Ctrl+W or Ctrl+T.
Following the steps in comment 6, I get taken to
http://validator.w3.org/check?uri=about%3Ablank  (and keyboard shortcuts
obviously work).
For that blank Validate tab as mentioned in comment #6, all I had to do was to
click once inside the tab, anywhere, and click <Ctrl-W>.  Closed the tab for me.
Summary: ctrl-w doesn't work in empty tabs → Ctrl-W doesn't close empty tabs
Something similar happens occasionally (Mozilla 0.9.9, Windows 2000).

Sometimes I'll get a blank tab (middle-clicking a link to open in a new tab, and
the link is dead/slashdotted).  I like to navigate with the keyboard, so I
Ctrl+PgUp/PgDn to the tab, but Ctrl+F4 doesn't work.  Neither does Ctrl+PgUp/PgDn!

I'm forced to use the mouse to close the tab and move to a different tab.
sounds like bug 76495
The problem I mentioned in comment 6 is bug 112337, "Blank tab (not about:blank)
can lose focus completely".  This wfm for about:blank as reported in comment 0
of this bug.
Same thing in WinME (Build 2002042908): On a "truly blank" or dead tab ( as in
Comment #6 ) with a gray background, [Ctrl] [W] does not close the tab. Clicking
on File/Close tab works fine.
Follow-up to my Comment #13: If a dead/blank tab occurs and if I have more than
one window (that's *window*) open and I cycle through the open windows (using
[ALT] [TAB]) and return to the window with the dead tab, [CTRL] [W] will then
properly close the dead tab.

This seems to be related:

One cannot close a tab with ctrl+w while the tab is loading.
I would like to be able to close a tab, if loading of the page takes too much
time.  So ctrl+w should be working even when the page is not yet loaded.

(I'm using 2002051006, 1.0rc2 on Win98se)
Confirming Markus Comment 14, but in WinME using build 2002051006. (Has been
true of all Win32 builds since then, though the last couple of days the build
downloads have been problematic and I've not tested.)
I'll chime in for this being an issue with the OS X CFM builds as well. If I
open a link in a new tab, and it fails to load, that tab will not close with
Cmd-w like a loaded tab would. 

Using "Close Tab" from the pop-up menu will work, loading another site to that
tab will make it responsive again, but otherwise the key command does not affect
an unloaded tab.

Using the 5/22 nightly, so maybe it's been fixed by now.
I commented in bug 102831 ("if focus is the url bar, ctrl-f4 does not close the
topmost tab") and in this bug saying that Ctrl+W worked for me when focus is in
the location bar of a tabbed window.  It now does not work for me in that case,
even if the tab is not blank.  I switched from Windows 98 to Windows XP since
adding those comments.
*** Bug 161611 has been marked as a duplicate of this bug. ***
Test that works:

(with middle click opening a tab in the background, at least.)

1) go to http://backwash.com
2) middle click a Recent Discussion link. This ought to fire a peice of
javascript to open a new window when normally clicked, and does. 

When middle clicked, it just opens a tab called (Untitled) which can't be closed
with Ctrl-W - you have to go to the tab and right click it or press the close
button.

I'm using moz 1.0 on XP.

HTH
*** Bug 165082 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 165902 has been marked as a duplicate of this bug. ***
QA Contact: sairuh → pmac
*** Bug 176673 has been marked as a duplicate of this bug. ***
I believe I bumped into the problem.  tab extensions addon blames the
preferences toolbar addon here.

--- quote --- http://www.cc-net.or.jp/~piro/xul/_tabextensions.en.html#problems
Unclosable tabs are opened when Preferences Toolbar (or other add-ons) is
installed. This is caused by a problem of Preferences Toolbar. I reported this
problem him and now I waiting his fix.
--- endquote ---
he links to: 
http://www.cc-net.or.jp/~piro/latest/2002/10.html#d1
(not english)

However, since the destination url isn't in english I'm not 100% sure.
Keywords: mozilla1.3, nsbeta1
Summary: Ctrl-W doesn't close empty tabs → Ctrl+W doesn't close empty tabs
*** Bug 150289 has been marked as a duplicate of this bug. ***
Setting All/All per comment 24.
OS: Linux → All
Hardware: PC → All
I am seeing this as well in mozilla 1.1

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Clicking on the content pane allows me to close it with ctrl-w.
Hmm.. since clicking on the (nonexistant) content allows ctrl-w, I'm guessing
the the cursor's focus in stuck in the location bar or something..

While I personally disagree with this activity, when the cursor in the location
bar, ctrl-w deletes the word to the left.. this is the designed behaviour.  I'm
told that on Linux this is not overriden by global preferences for ctrl-w to
remove the tab.

So.. ctrl-w does nothing because the cursor might be stuck somewhere, like in
the location bar.  It's a hunch.
Nav triage team: nsbeta1-
Keywords: nsbeta1nsbeta1-
*** Bug 172398 has been marked as a duplicate of this bug. ***
this looks like a duplicate of bug 72352
*** Bug 182794 has been marked as a duplicate of this bug. ***
This is fixed in Netscape 7.01, at least. Still broken on Mozilla trunk.
v1.2.1 exhibits this.  Is this a dup of 102831?
I agree with coment 30 - Most of this is a dupe of bug 72352. (Ctrl-w doesn't
work when focus is in location bar.)
The issue is confused however as several bugs were duped to this one that should
rather have been dupes of bug 112337. (Ctrl-w and all the other keyboard
shortcuts don't work in 'gray' tabs, such as you get when a site couldn't be found.)

bug 102831 is a completely seperate bug, as can be seen from this comment about
what the problem there is:
"ctrl(cmd) w and t are defined globally in navigator.xul whilst ctrl f4 is in
the binding. Move that out to exist at same location as T and W"

*** This bug has been marked as a duplicate of 72352 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
*** Bug 194197 has been marked as a duplicate of this bug. ***
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.