Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #38501
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Arno Welzel <usenet@arnowelzel.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: on change trigger |
| Date | Sun, 12 Jul 2020 18:03:55 +0200 |
| Lines | 22 |
| Message-ID | <hn0qjdFo95rU1@mid.individual.net> (permalink) |
| References | <jOqdnV3ui7CoRJrCnZ2dnUU7-RHNnZ2d@westnet.com.au> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net tj7l8jZL/PcDIJrTmhlyjwZEwkuTN8v4YgvsfoZzNH/Jcyb8oi |
| Cancel-Lock | sha1:3H3Zphqq1z0vjOFmpBSLlKe7blw= |
| In-Reply-To | <jOqdnV3ui7CoRJrCnZ2dnUU7-RHNnZ2d@westnet.com.au> |
| Xref | csiph.com comp.lang.javascript:38501 |
Show key headers only | View raw
Andrew Poulos:
> It seems that dispatching an event to an input within a form doesn't
> trigger the onchange event for the form:
>
> f.addEventListener('change', (e) => {
> console.log("f2", e); // zilch
> });
>
> inpt.dispatchEvent(new Event('change'));
>
> Where inpt is an input within a form f.
>
> 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.
--
Arno Welzel
https://arnowelzel.de
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
on change trigger Andrew Poulos <ap_prog@hotmail.com> - 2020-07-10 12:57 +1000
Re: on change trigger JJ <jj4public@vfemail.net> - 2020-07-10 16:03 +0700
Re: on change trigger James Kirk <noneya.invalid@gmail.com> - 2020-07-10 11:14 -0400
Re: on change trigger Julio Di Egidio <julio@diegidio.name> - 2020-07-10 23:33 -0700
Re: on change trigger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-07-11 17:52 -0700
Re: on change trigger Andrew Poulos <ap_prog@hotmail.com> - 2020-07-12 13:44 +1000
Re: on change trigger Arno Welzel <usenet@arnowelzel.de> - 2020-07-12 18:03 +0200
Re: on change trigger James Kirk <noneya.invalid@gmail.com> - 2020-07-12 13:17 -0400
Re: on change trigger Arno Welzel <usenet@arnowelzel.de> - 2020-07-13 17:24 +0200
Re: on change trigger James Kirk <noneya.invalid@gmail.com> - 2020-07-13 13:35 -0400
Re: on change trigger Arno Welzel <usenet@arnowelzel.de> - 2020-07-14 16:24 +0200
csiph-web