Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: on change trigger Date: Mon, 13 Jul 2020 17:24:45 +0200 Lines: 37 Message-ID: References: <20200712131711.574e32ad@james.kirk.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net QNfZdy6scxI0RU1J5f40xwLiwrWi/ZURDhtMqP9iX4MuI9hnCc Cancel-Lock: sha1:3Pv53dssKYmioVmRnkjk/T5l8JE= In-Reply-To: <20200712131711.574e32ad@james.kirk.invalid> Xref: csiph.com comp.lang.javascript:38508 James Kirk: > In Message: > Arno Welzel wrote: > >> Andrew Poulos: > >>> It seems that dispatching an event to an input within a form >>> doesn't trigger the onchange event for the form: > > [snip] > >>> Is that the expected behaviour? > >> The expected behaviour is, that the event is fired when you changed >> the input *and* the input loses the focus. It will not fired while >> typing something to the input. > > d̲i̲s̲p̲a̲t̲c̲h̲i̲n̲g̲ ̲a̲n̲ ̲e̲v̲e̲n̲t̲? Yes. > 𝐓𝐡𝐞 𝐜𝐡𝐚𝐧𝐠𝐞 𝐞v𝐞𝐧𝐭 𝐢𝐬 𝐟𝐢𝐫𝐞𝐝 … > > https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event#wikiArticle [...] > ¦ • When the element loses focus after its value was changed, but > ¦ not commited (e.g., after editing the value of