Bug 244692: Tabs bar, status bar, Download Manager, Extensions Manager and Themes Manager respond to all kinds of double-click (left, middle, right mouse buttons). r=ben

This commit is contained in:
steffen.wilberg%web.de 2004-09-19 17:31:28 +00:00
parent ddf4e18bb2
commit 336abe5e0f
8 changed files with 26 additions and 9 deletions

View File

@ -2843,8 +2843,8 @@ function onViewToolbarCommand(aEvent)
function displaySecurityInfo()
{
window.openDialog("chrome://browser/content/pageInfo.xul", "_blank",
"dialog=no", null, "securityTab");
window.openDialog("chrome://browser/content/pageInfo.xul", "_blank",
"dialog=no", null, "securityTab");
}
function displayPageReportFirstTime()

View File

@ -201,7 +201,7 @@
onfocus="URLBarFocusHandler(event, this);"
onmousedown="URLBarMouseDownHandler(event, this);"
onclick="URLBarClickHandler(event, this);"
oninfoclick="displaySecurityInfo()">
oninfoclick="displaySecurityInfo();">
<deck id="page-proxy-deck">
<image id="page-proxy-button"
ondraggesture="PageProxyDragGesture(event);"
@ -427,7 +427,8 @@
</hbox>
<statusbar class="chromeclass-status" id="status-bar"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<statusbarpanel id="security-button" class="statusbarpanel-iconic" ondblclick="displaySecurityInfo();"/>
<statusbarpanel id="security-button" class="statusbarpanel-iconic"
ondblclick="if (event.button == 0) displaySecurityInfo();"/>
<statusbarpanel id="page-report-button" class="statusbarpanel-iconic" tooltiptext="&pageReportIcon.tooltip;"
ondblclick="displayPageReport();"/>
<statusbarpanel id="page-theme-button" type="menu" class="statusbarpanel-menu-iconic" tooltiptext="&pageThemeIcon.tooltip;">

View File

@ -438,7 +438,7 @@
<handler event="dblclick">
<![CDATA[
if (event.originalTarget.className == "info-icon")
if (event.originalTarget.className == "info-icon" && event.button == 0)
return this.fireEvent("infoclick");
return true;
]]>

View File

@ -86,7 +86,7 @@
ondragdrop="nsDragAndDrop.drop(event, this.parentNode.parentNode.parentNode);
event.stopPropagation();"
xbl:inherits="onnewtab"
ondblclick="if (event.originalTarget.localName != 'tab') this.parentNode.parentNode.parentNode.selectedTab = this.parentNode.parentNode.parentNode.addTab();"
ondblclick="this.parentNode.parentNode.parentNode.onTabBarDblClick(event);"
onclosetab="var node = this.parentNode;
while (node.localName != 'tabbrowser')
node = node.parentNode;
@ -983,6 +983,16 @@
</body>
</method>
<method name="onTabBarDblClick">
<parameter name="aEvent"/>
<body>
<![CDATA[
if (aEvent.originalTarget.localName != 'tab' && aEvent.button == 0)
this.selectedTab = this.addTab();
]]>
</body>
</method>
<method name="addProgressListener">
<parameter name="aListener"/>
<parameter name="aMask"/>

View File

@ -318,6 +318,8 @@ function onDownloadShow(aEvent)
function onDownloadOpen(aEvent)
{
if (aEvent.type == "dblclick" && aEvent.button != 0)
return;
var download = aEvent.target;
if (download.localName == "download") {
if (download.openable) {

View File

@ -383,8 +383,11 @@ XPInstallDownloadManager.prototype = {
//
// View Event Handlers
//
function onViewDoubleClick()
function onViewDoubleClick(aEvent)
{
if (aEvent.button != 0)
return;
switch (gWindowState) {
case "extensions":
gExtensionsViewController.doCommand('cmd_options');

View File

@ -136,7 +136,7 @@
datasources="rdf:null" persist="last-selected"
ondragover="nsDragAndDrop.dragOver(event, gExtensionsDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, gExtensionsDNDObserver);"
ondblclick="onViewDoubleClick();">
ondblclick="onViewDoubleClick(event);">
<template>
<rule>
<conditions>

View File

@ -101,7 +101,8 @@
<handlers>
<handler event="dblclick">
<![CDATA[
this.showUpdates();
if (event.button == 0)
this.showUpdates();
]]>
</handler>
</handlers>