Skip to content

Commit 8801766

Browse files
committed
fix(validation): in safari
Remove change event in html on input and call _change at the bottom of click event.
1 parent 77ffba7 commit 8801766

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/client/scripts/rb-checkbox.js

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export class RbCheckbox extends FormControl(RbBase()) {
9898
async _onclick(value, evt) { // :void
9999
this.setValue(value);
100100
await this.validate();
101+
this._onchange(evt);
101102
}
102103
async _onkeypress(value, evt) { // :void
103104
const keys = ['enter','space'];

src/client/views/rb-checkbox.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
? html`<label class="label">${props.label}</label>`
1313
: null
1414
}
15-
15+
1616
<label
1717
tabindex="${props.disabled ? -1 : 0}"
1818
class="sublabel ${!!props.value ? 'active' : ''}"
@@ -26,7 +26,6 @@
2626
name="${props.name}"
2727
.value="${props.value}"
2828
?checked="${!!props.value}"
29-
@change="${this._onchange.bind(this)}"
3029
@click="${this._onclick.bind(this, props.value)}">
3130
</label>
3231

0 commit comments

Comments
 (0)