diff --git a/browser/components/tabview/test/Makefile.in b/browser/components/tabview/test/Makefile.in index c2c35edb603..9c6205a07b9 100644 --- a/browser/components/tabview/test/Makefile.in +++ b/browser/components/tabview/test/Makefile.in @@ -169,6 +169,7 @@ _BROWSER_FILES = \ browser_tabview_bug706430.js \ browser_tabview_bug706736.js \ browser_tabview_bug707466.js \ + browser_tabview_bug728887.js \ browser_tabview_click_group.js \ browser_tabview_dragdrop.js \ browser_tabview_exit_button.js \ diff --git a/browser/components/tabview/test/browser_tabview_bug728887.js b/browser/components/tabview/test/browser_tabview_bug728887.js new file mode 100644 index 00000000000..fd1a82bb339 --- /dev/null +++ b/browser/components/tabview/test/browser_tabview_bug728887.js @@ -0,0 +1,15 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +function test() { + waitForExplicitFinish(); + + showTabView(function () { + let cw = TabView.getContentWindow(); + let target = cw.GroupItems.groupItems[0].container; + EventUtils.sendMouseEvent({type: "dblclick", button: 0}, target, cw); + is(cw.GroupItems.groupItems.length, 1, "one groupItem after double clicking"); + + hideTabView(finish); + }); +} diff --git a/browser/components/tabview/ui.js b/browser/components/tabview/ui.js index 0dab4143944..650e433acaf 100644 --- a/browser/components/tabview/ui.js +++ b/browser/components/tabview/ui.js @@ -205,6 +205,9 @@ let UI = { }); iQ(gTabViewFrame.contentDocument).dblclick(function(e) { + if (e.originalTarget.id != "content") + return; + // Create a group with one tab on double click let box = new Rect(e.clientX - Math.floor(TabItems.tabWidth/2),