Subscribe on changes!

Change event not firing in Safari

avatar
Apr 14th 2023

Vue version

3.2.19

Link to minimal reproduction

Site is not public.

Steps to reproduce

Add @change="functionName" to input element.

What is expected?

Function gets called when input is changed.

What is actually happening?

Function does not get fired.

System Info

Safari version: 16.3 (18614.4.6.1.5)
Mac OS: Ventura 13.2 (22D49)

Any additional comments?

Verified that Safari does support the change event. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event

avatar
Apr 17th 2023

@LinusBorg Here is a example of it not working. https://jsfiddle.net/n5uyadpm/2/ Change the value in the second input from 401.7 to 4010.7. It fires in every other browser, except Safari.

avatar
Apr 18th 2023

We're having a similar issue with Safari. The change event is not firing for computed properties. we are removing the comma of the string and converting the string to a number. we are not using the brightspace but the same issue.

avatar
Apr 18th 2023

@LinusBorg Here is a example of it not working. jsfiddle.net/n5uyadpm/2 Change the value in the second input from 401.7 to 4010.7. It fires in every other browser, except Safari.

Interesting. It only happens with the formatter though. if you just return the raw value from the computed's getter, everything works: https://jsfiddle.net/Linusborg/zsw4nd0c/1/

Seems the formatter screws up something. So Still does not feel like a bug on our side, but worth investigating.

I'll reopen.

avatar
Apr 18th 2023

What would really help is if the number modifier like v-model.number="varName" would allow valid characters like commas. As well as more modifiers like v-model.percent="varName", v-model.currency="varName", etc...

avatar
Jul 14th 2023

@blur="triggerEventChange()"

avatar
Jul 15th 2023

@blur="triggerEventChange()"

Change and blur event are not the same.