Fixes #918, Enabling "Show Unfiled Items" or "Show Duplicates" breaks UI
This commit is contained in:
parent
4fcf0c3c15
commit
6b509820b3
5 changed files with 60 additions and 36 deletions
|
@ -251,6 +251,33 @@ function waitForCallback(cb, interval, timeout) {
|
|||
}
|
||||
|
||||
|
||||
function clickOnItemsRow(itemsView, row, button = 0) {
|
||||
var x = {};
|
||||
var y = {};
|
||||
var width = {};
|
||||
var height = {};
|
||||
itemsView._treebox.getCoordsForCellItem(
|
||||
row,
|
||||
itemsView._treebox.columns.getNamedColumn('zotero-items-column-title'),
|
||||
'text',
|
||||
x, y, width, height
|
||||
);
|
||||
|
||||
// Select row to trigger multi-select
|
||||
var tree = itemsView._treebox.treeBody;
|
||||
var rect = tree.getBoundingClientRect();
|
||||
var x = rect.left + x.value;
|
||||
var y = rect.top + y.value;
|
||||
tree.dispatchEvent(new MouseEvent("mousedown", {
|
||||
clientX: x,
|
||||
clientY: y,
|
||||
button,
|
||||
detail: 1
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get a default group used by all tests that want one, creating one if necessary
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue