InputText "JavaScript" message

If you open the playground link in WeChat in Android platform, and click the inputText, it will pop up the dialog with “JavaScript” instead of my custom message.This only happens if you open the link in WeChat in Android platform.

If it only happens in WeChat could you check with their support ?

In the meantime, @RaananW, @carolhmj any idea what could go wrong and if we could have a workaround ?

Consolidating with:

can you still tap on the line and input text?
The title is the website you are currently visiting (hence the local network address you see ion iOS). is it possible that the internal wechat browser doesn’t fully support window.prompt().

We can consider using dialog element instead of window.prompt if it is not working in all browsers. But i really want to understand if it is just a title issue, or really not working at all.

1 Like

It’s only title issue, u still can input text

And I have confirmed that it is the WeChat that does not support window.prompt in android , is there some walkaround?

there is no direct workaround apart from implementing your own input for mobile, but we can look into using a dialog element instead of a prompt

1 Like

When could it be available?

Thanks for the big picture

they are by no means deprecated. no browser has any plans of removing those APIs. They might be outdated, they might be not the best APIs offered, but they are not deprecated.

So should I create my own input element using ? Is it more universal?

We first need to investigate a bit and see what is possible. This would not be our highest priority, as this feature is working on most available browsers without an issue. Of course, we want to always be compatible with every browser available, but we have a long list of features we want to implement.

Of course, we accept PRs and will be happy to see the community contribute here!

1 Like

i would recommend you to test the usage of dialog elements and see how possible it is to integrate those on top of your canvas element, and whether or not they fit your usecase

it’s true - they block the execution thread. But they are not deprecated. and there is no plan of making these functions deprecated. at least not that I know of.
If you are referring to this - Deprecate alert(), confirm(), prompt() · Issue #2894 · whatwg/html · GitHub, this is a public issue on a public repository. Anyone can one. Prompt, confirm and alert are still being used throughout the net - Chrome Platform Status

I’ve created a dialog to solve this problem in the end , it works well for now. BTW, I can not set an answer as solution in this topic…

1 Like

I had to read up on the deprecation issue…
So apparently it’s only for third-parties, e.g. Cross origin Iframes
https://chromestatus.com/feature/5148698084376576#details

It was already implemented back in 2021,
But temporarily reversed due to push-back from the web dev community.

Status in the first link still says ‘in development’, so it appears they intend on implementing it, just giving people more time to prepare / update their old code, etc.