No issue - Fix a potential autocomplete issue.

Account for the case where we don't have a tree view in selectedIndex
setter which may break future autocompletes.
This commit is contained in:
Moonchild 2021-12-17 22:13:49 +01:00 committed by roytam1
commit bae3220dd5

View file

@ -780,7 +780,12 @@
onget="return this.tree.currentIndex;">
<setter>
<![CDATA[
this.tree.view.selection.select(val);
if (!this.tree.view) {
// We don't have a view? return "no selection".
val = -1;
} else {
this.tree.view.selection.select(val);
}
if (this.tree.treeBoxObject.height > 0)
this.tree.treeBoxObject.ensureRowIsVisible(val < 0 ? 0 : val);
// Fire select event on xul:tree so that accessibility API