Bug 365773: radiogroup.selectedItem = null fails if group is focused, patch by Wladimir Palant <trev@gtchat.de>, r=neil

This commit is contained in:
gavin%gavinsharp.com 2007-01-04 20:08:52 +00:00
Родитель d15c593319
Коммит 60754c67a9
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -123,9 +123,12 @@
if (!alreadySelected && focused) {
// Only report if actual change
var myEvent = document.createEvent("Events");
myEvent.initEvent("RadioStateChange", true, true);
val.dispatchEvent(myEvent);
var myEvent;
if (val) {
myEvent = document.createEvent("Events");
myEvent.initEvent("RadioStateChange", true, true);
val.dispatchEvent(myEvent);
}
if (previousItem) {
myEvent = document.createEvent("Events");

Просмотреть файл

@ -123,9 +123,12 @@
if (!alreadySelected && focused) {
// Only report if actual change
var myEvent = document.createEvent("Events");
myEvent.initEvent("RadioStateChange", true, true);
val.dispatchEvent(myEvent);
var myEvent;
if (val) {
myEvent = document.createEvent("Events");
myEvent.initEvent("RadioStateChange", true, true);
val.dispatchEvent(myEvent);
}
if (previousItem) {
myEvent = document.createEvent("Events");