From 385129206c2dbc9e6ff3f2ddede4a7c9d995883e Mon Sep 17 00:00:00 2001 From: "chanial%noos.fr" Date: Sun, 17 Aug 2003 11:10:28 +0000 Subject: [PATCH] bug 213228: new toolkit independence bug, part 7: update and use the new toolkit widgetry. radio.xml: bug 112789, 195393 by neil, bug 169489 by aaronl, bug 185690 by kaie, bug 201166 by jgaunt --- toolkit/content/widgets/radio.xml | 151 +++++++++++++++++++----------- 1 file changed, 98 insertions(+), 53 deletions(-) diff --git a/toolkit/content/widgets/radio.xml b/toolkit/content/widgets/radio.xml index ff43727b4d3..16e949b4d95 100644 --- a/toolkit/content/widgets/radio.xml +++ b/toolkit/content/widgets/radio.xml @@ -25,7 +25,14 @@ @@ -43,6 +50,25 @@ + + + + + + + + + children.length) + if (++i == children.length) + i = 0; + if (i == index) break; } - while (children[index].getAttribute("hidden") == "true" || children[index].disabled); - // XXX check for collapsed attr and display/visibility props too + while (children[i].hidden || children[i].collapsed || children[i].disabled); + // XXX check for display/visibility props too - this.selectedItem = children[index]; - children[index].doCommand(); + this.selectedItem = children[i]; + children[i].doCommand(); } else { do { - index = i > 0 ? --i : (i = children.length - 1); - if (i == children.length) + if (i == 0) + i = children.length; + if (--i == index) break; } - while (children[index].getAttribute("hidden") == "true" || children[index].disabled); - // XXX check for collapsed attr and display/visibility props too + while (children[i].hidden || children[i].collapsed || children[i].disabled); + // XXX check for display/visibility props too - this.selectedItem = children[index]; - children[index].doCommand(); + this.selectedItem = children[i]; + children[i].doCommand(); } ]]> @@ -230,13 +256,6 @@ - - - - - - + + if (this.disabled) + event.preventDefault(); + - + this.selectedItem = this.focusedItem; this.selectedItem.doCommand(); @@ -285,11 +301,24 @@ it is not (Windows platform behaviour is for the group to receive focus, not the item --> - if (event.target == this) { + this.removeAttribute("focused"); @@ -298,16 +327,16 @@ - + - + - + @@ -347,15 +376,31 @@ + + + + + + + + + - \ No newline at end of file +