diff --git a/mozilla/layout/forms/resources/content/select.xml b/mozilla/layout/forms/resources/content/select.xml
index 9d4e8ebb089..c08673d7c7e 100644
--- a/mozilla/layout/forms/resources/content/select.xml
+++ b/mozilla/layout/forms/resources/content/select.xml
@@ -66,6 +66,8 @@
if (!b.selection.isSelected(row.value)) {
b.selection.select(row.value);
+ if ("onchange" in this)
+ this.onchange();
}
}
]]>
@@ -92,6 +94,8 @@
b.selection.toggleSelect(row.value);
b.selection.currentIndex = row.value;
}
+ if ("onchange" in this)
+ this.onchange();
else {
/* We want to deselect all the selected items except what was
clicked, UNLESS it was a right-click. We have to do this
@@ -101,8 +105,11 @@
// if the last row has changed in between the time we
// mousedown and the time we click, don't fire the select handler.
// see bug #92366
- if (this._lastSelectedRow == row.value)
+ if (this._lastSelectedRow == row.value) {
b.selection.select(row.value);
+ if ("onchange" in this)
+ this.onchange();
+ }
}
]]>
@@ -159,6 +166,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(c-1, 500);
this.outlinerBoxObject.ensureRowIsVisible(c-1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -172,6 +181,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(c+1, 500);
this.outlinerBoxObject.ensureRowIsVisible(c+1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -198,6 +209,8 @@
}
this.selectionTail = c - 1;
this.outlinerBoxObject.ensureRowIsVisible(c - 1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -224,6 +237,8 @@
}
this.selectionTail = c + 1;
this.outlinerBoxObject.ensureRowIsVisible(c + 1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -266,6 +281,8 @@
this.outlinerBoxObject.scrollByPages(-1);
}
this.outlinerBoxObject.selection.timedSelect(i, 500);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -289,6 +306,8 @@
this.outlinerBoxObject.scrollByPages(1);
}
this.outlinerBoxObject.selection.timedSelect(i, 500);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -329,6 +348,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, i, true);
}
this.selectionTail = i;
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -371,6 +392,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, i, true);
}
this.selectionTail = i;
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -422,6 +445,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(0, 500);
this.outlinerBoxObject.ensureRowIsVisible(0);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -434,6 +459,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(l, 500);
this.outlinerBoxObject.ensureRowIsVisible(l);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -451,6 +478,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, 0, true);
this.selectionTail = 0;
this.outlinerBoxObject.ensureRowIsVisible(0);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -469,6 +498,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, l, true);
this.selectionTail = l;
this.outlinerBoxObject.ensureRowIsVisible(l);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -495,8 +526,11 @@
event.preventDefault();
if (event.keyCode == ' ') {
var c = this.currentIndex;
- if (!this.outlinerBoxObject.selection.isSelected(c))
+ if (!this.outlinerBoxObject.selection.isSelected(c)) {
this.outlinerBoxObject.selection.toggleSelect(c);
+ if ("onchange" in this)
+ this.onchange();
+ }
}
]]>
diff --git a/mozilla/layout/html/forms/resources/content/select.xml b/mozilla/layout/html/forms/resources/content/select.xml
index 9d4e8ebb089..c08673d7c7e 100644
--- a/mozilla/layout/html/forms/resources/content/select.xml
+++ b/mozilla/layout/html/forms/resources/content/select.xml
@@ -66,6 +66,8 @@
if (!b.selection.isSelected(row.value)) {
b.selection.select(row.value);
+ if ("onchange" in this)
+ this.onchange();
}
}
]]>
@@ -92,6 +94,8 @@
b.selection.toggleSelect(row.value);
b.selection.currentIndex = row.value;
}
+ if ("onchange" in this)
+ this.onchange();
else {
/* We want to deselect all the selected items except what was
clicked, UNLESS it was a right-click. We have to do this
@@ -101,8 +105,11 @@
// if the last row has changed in between the time we
// mousedown and the time we click, don't fire the select handler.
// see bug #92366
- if (this._lastSelectedRow == row.value)
+ if (this._lastSelectedRow == row.value) {
b.selection.select(row.value);
+ if ("onchange" in this)
+ this.onchange();
+ }
}
]]>
@@ -159,6 +166,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(c-1, 500);
this.outlinerBoxObject.ensureRowIsVisible(c-1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -172,6 +181,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(c+1, 500);
this.outlinerBoxObject.ensureRowIsVisible(c+1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -198,6 +209,8 @@
}
this.selectionTail = c - 1;
this.outlinerBoxObject.ensureRowIsVisible(c - 1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -224,6 +237,8 @@
}
this.selectionTail = c + 1;
this.outlinerBoxObject.ensureRowIsVisible(c + 1);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -266,6 +281,8 @@
this.outlinerBoxObject.scrollByPages(-1);
}
this.outlinerBoxObject.selection.timedSelect(i, 500);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -289,6 +306,8 @@
this.outlinerBoxObject.scrollByPages(1);
}
this.outlinerBoxObject.selection.timedSelect(i, 500);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -329,6 +348,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, i, true);
}
this.selectionTail = i;
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -371,6 +392,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, i, true);
}
this.selectionTail = i;
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -422,6 +445,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(0, 500);
this.outlinerBoxObject.ensureRowIsVisible(0);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -434,6 +459,8 @@
this.selectionTail = -1;
this.outlinerBoxObject.selection.timedSelect(l, 500);
this.outlinerBoxObject.ensureRowIsVisible(l);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -451,6 +478,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, 0, true);
this.selectionTail = 0;
this.outlinerBoxObject.ensureRowIsVisible(0);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -469,6 +498,8 @@
this.outlinerBoxObject.selection.rangedSelect(c, l, true);
this.selectionTail = l;
this.outlinerBoxObject.ensureRowIsVisible(l);
+ if ("onchange" in this)
+ this.onchange();
]]>
@@ -495,8 +526,11 @@
event.preventDefault();
if (event.keyCode == ' ') {
var c = this.currentIndex;
- if (!this.outlinerBoxObject.selection.isSelected(c))
+ if (!this.outlinerBoxObject.selection.isSelected(c)) {
this.outlinerBoxObject.selection.toggleSelect(c);
+ if ("onchange" in this)
+ this.onchange();
+ }
}
]]>