this seems to work?

pull/16649/head
Rich Harris 2 weeks ago
parent 8640ca73dd
commit 0357b5fa75

@ -17,8 +17,6 @@ import { current_batch, previous_batch } from '../../../reactivity/batch.js';
* @returns {void} * @returns {void}
*/ */
export function bind_value(input, get, set = get) { export function bind_value(input, get, set = get) {
var runes = is_runes();
var batches = new WeakSet(); var batches = new WeakSet();
listen_to_event_and_reset_event(input, 'input', async (is_reset) => { listen_to_event_and_reset_event(input, 'input', async (is_reset) => {
@ -41,9 +39,8 @@ export function bind_value(input, get, set = get) {
// update the input and reset the selection state // update the input and reset the selection state
await tick(); await tick();
// In runes mode, respect any validation in accessors (doesn't apply in legacy mode, // Respect any validation in accessors
// because we use mutable state which ensures the render effect always runs) if (value !== (value = get())) {
if (runes && value !== (value = get())) {
var start = input.selectionStart; var start = input.selectionStart;
var end = input.selectionEnd; var end = input.selectionEnd;

Loading…
Cancel
Save