Handle oninput for select elements
This commit is contained in:
1 parent
a025617db3
commit
c32d6dc8cb
1 file changed
+13
-4
@@ -442,10 +442,6 @@ function handler(event, name, bubbles, config) {
|
|||||||
|
|
||||||
/*POST_EVENT_SERIALIZATION*/
|
/*POST_EVENT_SERIALIZATION*/
|
||||||
|
|
||||||
if (
|
|
||||||
target.tagName === "FORM" &&
|
|
||||||
(event.type === "submit" || event.type === "input")
|
|
||||||
) {
|
|
||||||
if (
|
if (
|
||||||
target.tagName === "FORM" &&
|
target.tagName === "FORM" &&
|
||||||
(event.type === "submit" || event.type === "input")
|
(event.type === "submit" || event.type === "input")
|
||||||
@@ -457,6 +453,19 @@ function handler(event, name, bubbles, config) {
|
|||||||
contents.values[name] = value;
|
contents.values[name] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
target.tagName === "SELECT" &&
|
||||||
|
event.type === "input"
|
||||||
|
) {
|
||||||
|
const selectData = target.options;
|
||||||
|
contents.values["options"] = [];
|
||||||
|
for (let i = 0; i < selectData.length; i++) {
|
||||||
|
let option = selectData[i];
|
||||||
|
if (option.selected) {
|
||||||
|
contents.values["options"].push(option.value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (realId === null) {
|
if (realId === null) {
|
||||||
|
|||||||
Reference in new issue
Block a user