From bae8e7fa99ff92fef57c34cdb8780f4e64de1dc8 Mon Sep 17 00:00:00 2001 From: "aaronleventhal%moonset.net" Date: Mon, 25 Jul 2005 19:25:38 +0000 Subject: [PATCH] Bug 280153. Often no visible focus when tree or list gets focus. r+a=mconnor git-svn-id: svn://10.0.0.236/trunk@176548 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/content/widgets/listbox.xml | 15 ++++++++++++++- mozilla/toolkit/content/widgets/tree.xml | 13 ++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/mozilla/toolkit/content/widgets/listbox.xml b/mozilla/toolkit/content/widgets/listbox.xml index b89f2a300ef..b3db00a0da9 100644 --- a/mozilla/toolkit/content/widgets/listbox.xml +++ b/mozilla/toolkit/content/widgets/listbox.xml @@ -228,7 +228,7 @@ = 0) @@ -504,6 +504,19 @@ + + 0) { + this.currentItem = getItemAtIndex(0); // focus first item + if (this.selType != 'multiple') { + // In single selection trees the selection should be the same + // as the focus + this.timedSelect(currentItem, this._selectDelay); + } + this.ensureIndexIsVisible(0); + } + ]]> + - + + 0) { + this.currentIndex = 0; + if (this.view.selection.single) { + this.view.selection.select(0); + } + this.treeBoxObject.ensureRowIsVisible(0); + } + ]]> +