Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #38508

Re: on change trigger

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 Mon, 13 Jul 2020 17:24:45 +0200
Lines 37
Message-ID <hn3cltFa4l5U2@mid.individual.net> (permalink)
References <jOqdnV3ui7CoRJrCnZ2dnUU7-RHNnZ2d@westnet.com.au> <hn0qjdFo95rU1@mid.individual.net> <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

Show key headers only | View raw


James Kirk:

> In Message: <hn0qjdFo95rU1@mid.individual.net>
> Arno Welzel <usenet@arnowelzel.de> 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 <textarea> or
>    ¦   <input type="text">).

That is, what I was talking about. I head text inputs in my mind.


-- 
Arno Welzel
https://arnowelzel.de

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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