You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The input field will receive ongoing onblur events while clicking through the datepicker.
While seemingly innocent, I've run into this because we update a huge calculation on blur events of every input field.
My current fix is:
const datePicker = new AirDatepicker(el, {...});
el.addEventListener('blur', (event) => {
// The 'blur' event happens all the time while clicking through the date picker.
// It will try to restore "focus" on the field, which will blur gain on the next click.
if (datePicker.inFocus) {
event.stopImmediatePropagation();
}
});
The text was updated successfully, but these errors were encountered:
vdboor
changed the title
Many onBlur events in Firefox
Many onBlur events while clicking through days
Jul 31, 2024
The input field will receive ongoing onblur events while clicking through the datepicker.
While seemingly innocent, I've run into this because we update a huge calculation on blur events of every input field.
My current fix is:
The text was updated successfully, but these errors were encountered: