mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
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:
parent
de7ec12f83
commit
bae3220dd5
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue