зеркало из https://github.com/mozilla/pjs.git
Add support for CTRL+w closing the curren tab in multi-tabbedm ode. sr=ben, r=hewitt
This commit is contained in:
Родитель
de8dc33f35
Коммит
3b76f8e8f0
|
@ -897,12 +897,19 @@ function BrowserSetForcedDetector()
|
|||
|
||||
function BrowserClose()
|
||||
{
|
||||
var browser = getBrowser();
|
||||
if (browser && browser.localName == 'tabbrowser' && browser.mTabContainer.childNodes.length > 1) {
|
||||
// Just close up a tab.
|
||||
browser.removeCurrentTab(); // XXXdwh In tab mode, the menu item should say close tab.
|
||||
return;
|
||||
}
|
||||
|
||||
// This code replicates stuff in Shutdown(). It is here because
|
||||
// window.screenX and window.screenY have real values. We need
|
||||
// to fix this eventually but by replicating the code here, we
|
||||
// provide a means of saving position (it just requires that the
|
||||
// user close the window via File->Close (vs. close box).
|
||||
|
||||
|
||||
// Get the current window position/size.
|
||||
var x = window.screenX;
|
||||
var y = window.screenY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче