mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 728887 - Double clicking a tab group creates a new group under it; r=dietrich
This commit is contained in:
parent
87ff8e798d
commit
df4d976502
@ -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 \
|
||||
|
15
browser/components/tabview/test/browser_tabview_bug728887.js
Normal file
15
browser/components/tabview/test/browser_tabview_bug728887.js
Normal 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);
|
||||
});
|
||||
}
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user