Skip to content

Commit 53d9f22

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent c3ecc73 commit 53d9f22

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/widgets/forms/basic.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,9 @@ export function basicField (
194194
if (deferWhileFocused && dom.activeElement === field) return
195195
// i.e. lose focus with changed data
196196
if (params.pattern && !field.value.match(params.pattern)) return
197-
const disabledForSave = !deferWhileFocused
198-
if (disabledForSave) {
199-
field.disabled = true // See if this stops getting two dates from fumbling e.g the chrome datepicker.
200-
}
197+
// Always disable during async save to prevent duplicate/overlapping updates,
198+
// including for date/datetime-local fields.
199+
field.disabled = true // See if this stops getting two dates from fumbling e.g the chrome datepicker.
201200
field.setAttribute('style', inputStyle + 'color: gray;') // pending
202201
const ds = kb.statementsMatching(subject, property as any) // remove any multiple values
203202
let result

0 commit comments

Comments
 (0)