Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The addon is not working in Safari #4

Open
jcgueriaud1 opened this issue Aug 15, 2023 · 5 comments
Open

The addon is not working in Safari #4

jcgueriaud1 opened this issue Aug 15, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@jcgueriaud1
Copy link
Contributor

When I'm trying to fill the value in the demo, the valuechange event is not necessary called when I'm using Safari. (Version 15.6 (17613.3.9.1.5))
It happens when the TextField has the ValueChangeMode set to ValueChangeMode.ON_CHANGE.

It seems ok in the other modes.
Apparently the change event is not fired from the client side.

Screen.Recording.2023-08-15.at.14.22.07.mov
@jcgueriaud1 jcgueriaud1 added the bug Something isn't working label Aug 15, 2023
@jcgueriaud1
Copy link
Contributor Author

jcgueriaud1 commented Aug 15, 2023

The change is not fired in the imask demo: https://imask.js.org/

If you add this to the number input, the changed event is called all the time in Chrome and sometimes in Safari.
$0.addEventListener("change", e=> { console.error("changed")});

One workaround is to use on blur instead of on change.

I also tried the latest version of imask and I have the same issue.

@jcgueriaud1
Copy link
Contributor Author

jcgueriaud1 commented Aug 16, 2023

The workaround can be (for the textfield you want to extend)

        if (VaadinSession.getCurrent().getBrowser().isSafari()) {
            setValueChangeMode(ValueChangeMode.ON_BLUR);
        }

@gidravlic
Copy link

The workaround can be (for the textfield you want to extend)

        if (VaadinSession.getCurrent().getBrowser().isSafari()) {
            setValueChangeMode(ValueChangeMode.ON_BLUR);
        }

Please try in iOS with Chrome 115

@jcgueriaud1
Copy link
Contributor Author

What do you mean?
Does it work?

@gidravlic
Copy link

@jcgueriaud1 sorry, i mean that component not work with iOS with Chrome 115 on value change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants