|
@@ -46,10 +46,6 @@ directive('model', (el, { modifiers, expression }, { effect, cleanup }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (modifiers.includes('fill') && el.hasAttribute('value') && (getValue() === null || getValue() === '')) {
|
|
|
|
- setValue(el.value)
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (typeof expression === 'string' && el.type === 'radio') {
|
|
if (typeof expression === 'string' && el.type === 'radio') {
|
|
// Radio buttons only work properly when they share a name attribute.
|
|
// Radio buttons only work properly when they share a name attribute.
|
|
@@ -73,7 +69,10 @@ directive('model', (el, { modifiers, expression }, { effect, cleanup }) => {
|
|
let removeListener = isCloning ? () => {} : on(el, event, modifiers, (e) => {
|
|
let removeListener = isCloning ? () => {} : on(el, event, modifiers, (e) => {
|
|
setValue(getInputValue(el, modifiers, e, getValue()))
|
|
setValue(getInputValue(el, modifiers, e, getValue()))
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ if (modifiers.includes('fill') && [null, ''].includes(getValue())) {
|
|
|
|
+ el.dispatchEvent(new Event(event, {}));
|
|
|
|
+ }
|
|
// Register the listener removal callback on the element, so that
|
|
// Register the listener removal callback on the element, so that
|
|
// in addition to the cleanup function, x-modelable may call it.
|
|
// in addition to the cleanup function, x-modelable may call it.
|
|
// Also, make this a keyed object if we decide to reintroduce
|
|
// Also, make this a keyed object if we decide to reintroduce
|