@pageboard/html 0.12.25 → 0.12.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/form.js +4 -2
package/package.json
CHANGED
package/ui/form.js
CHANGED
|
@@ -138,10 +138,10 @@ class HTMLElementForm extends Page.create(HTMLFormElement) {
|
|
|
138
138
|
paint(state) {
|
|
139
139
|
// ?submit=<name> for auto-submit
|
|
140
140
|
// WORKAROUND use Page instead of state
|
|
141
|
-
const name =
|
|
141
|
+
const name = state.query.submit;
|
|
142
142
|
if (!name || name != this.name) return;
|
|
143
143
|
// make sure to not resubmit in case of self-redirection
|
|
144
|
-
delete
|
|
144
|
+
delete state.query.submit;
|
|
145
145
|
state.finish(() => {
|
|
146
146
|
if (state.status != 200) return;
|
|
147
147
|
this.dispatchEvent(new Event('submit', {
|
|
@@ -455,6 +455,8 @@ HTMLButtonElement.prototype.fill = HTMLInputElement.prototype.fill = function (v
|
|
|
455
455
|
if (this.type == "file") {
|
|
456
456
|
if (val === '') this.removeAttribute('value');
|
|
457
457
|
else this.setAttribute('value', val);
|
|
458
|
+
} else if (this.type == "submit" && this.value == '') {
|
|
459
|
+
this.value = val;
|
|
458
460
|
} else {
|
|
459
461
|
this.value = val;
|
|
460
462
|
}
|