Bug 728887 - Double clicking a tab group creates a new group under it; r=dietrich

This commit is contained in:
Tim Taubert 2012-02-22 09:58:43 +01:00
parent 87ff8e798d
commit df4d976502
3 changed files with 19 additions and 0 deletions

View File

@ -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 \

View File

@ -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);
});
}

View File

@ -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),