From 10f64ee14a09136318897bea826752d918c85e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Wed, 12 May 2010 09:10:25 +0200 Subject: [PATCH] Bug 565024 - accel+click doesn't restore about:sessionrestore entries on OS X. r=paul --- .../sessionstore/content/aboutSessionRestore.js | 11 ++++++++--- .../sessionstore/content/aboutSessionRestore.xhtml | 2 +- browser/components/sessionstore/jar.mn | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/browser/components/sessionstore/content/aboutSessionRestore.js b/browser/components/sessionstore/content/aboutSessionRestore.js index 45ac894b435..e8f2e2a7cff 100644 --- a/browser/components/sessionstore/content/aboutSessionRestore.js +++ b/browser/components/sessionstore/content/aboutSessionRestore.js @@ -160,9 +160,14 @@ function onListClick(aEvent) { var row = {}, col = {}; treeView.treeBox.getCellAt(aEvent.clientX, aEvent.clientY, row, col, {}); if (col.value) { - // restore this specific tab in the same window for double clicking or middle clicking - // or Ctrl+clicking on a tab's title - note: ctrl clicking doesn't work on Mac - if ((aEvent.button == 1 || aEvent.button == 0 && aEvent.detail == 2 || aEvent.ctrlKey) && + // Restore this specific tab in the same window for middle/double/accel clicking + // on a tab's title. +#ifdef XP_MACOSX + let accelKey = aEvent.metaKey; +#else + let accelKey = aEvent.ctrlKey; +#endif + if ((aEvent.button == 1 || aEvent.button == 0 && aEvent.detail == 2 || accelKey) && col.value.id == "title" && !treeView.isContainer(row.value)) restoreSingleTab(row.value, aEvent.shiftKey); diff --git a/browser/components/sessionstore/content/aboutSessionRestore.xhtml b/browser/components/sessionstore/content/aboutSessionRestore.xhtml index 7175b53b04f..26b404f7c00 100644 --- a/browser/components/sessionstore/content/aboutSessionRestore.xhtml +++ b/browser/components/sessionstore/content/aboutSessionRestore.xhtml @@ -54,7 +54,7 @@ -