# InputText "JavaScript" message

**URL:** <https://forum.babylonjs.com/t/inputtext-javascript-message/38352>\
**Category:** Questions\
**Created:** [February 19, 2023, 1:04am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352 "2023-02-19T01:04:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digital\_Mimesis\_Lab](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/digital_mimesis_lab/32/26710_2.png) [@Digital\_Mimesis\_Lab](https://forum.babylonjs.com/u/Digital_Mimesis_Lab)\
**Post date:** [February 19, 2023, 1:04am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/1 "2023-02-19T01:04:45Z")

</div>

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.

 ![微信图片_20230219090945](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/a/5af9ab05037e7c23c44258573f4f5c818804162e.jpeg)

> **[Babylon.js Playground](https://playground.babylonjs.com/#UWS0TS)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 20, 2023, 11:09am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/2 "2023-02-20T11:09:03Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 20, 2023, 11:30am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/3 "2023-02-20T11:30:39Z")

</div>

Consolidating with:

- [intputText promptMessage displays "JavaScript" instead of message wriiten by me - #3 by Yang\_Yu](https://forum.babylonjs.com/t/intputtext-promptmessage-displays-javascript-instead-of-message-wriiten-by-me/38339/3)
- [Pop up JavaScript dialog when click inputText field - #3 by Yang\_Yu](https://forum.babylonjs.com/t/pop-up-javascript-dialog-when-click-inputtext-field/38297/3)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 20, 2023, 11:40am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/4 "2023-02-20T11:40:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Yang\_Yu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yang_yu/32/28548_2.png) [@Yang\_Yu](https://forum.babylonjs.com/u/Yang_Yu)\
**Post date:** [February 21, 2023, 12:38am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/5 "2023-02-21T00:38:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yang\_Yu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yang_yu/32/28548_2.png) [@Yang\_Yu](https://forum.babylonjs.com/u/Yang_Yu)\
**Post date:** [February 21, 2023, 12:40am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/6 "2023-02-21T00:40:39Z")

</div>

> [@RaananW](#):
>
> window.prompt

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

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 21, 2023, 11:12am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/8 "2023-02-21T11:12:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yang\_Yu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yang_yu/32/28548_2.png) [@Yang\_Yu](https://forum.babylonjs.com/u/Yang_Yu)\
**Post date:** [February 21, 2023, 11:43am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/9 "2023-02-21T11:43:22Z")

</div>

When could it be available?

---

<div class="post-metadata">

**Author:** ![Yang\_Yu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yang_yu/32/28548_2.png) [@Yang\_Yu](https://forum.babylonjs.com/u/Yang_Yu)\
**Post date:** [February 21, 2023, 11:43am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/10 "2023-02-21T11:43:39Z")

</div>

Thanks for the big picture

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 21, 2023, 11:58am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/11 "2023-02-21T11:58:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Yang\_Yu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yang_yu/32/28548_2.png) [@Yang\_Yu](https://forum.babylonjs.com/u/Yang_Yu)\
**Post date:** [February 21, 2023, 12:01pm UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/12 "2023-02-21T12:01:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 21, 2023, 12:02pm UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/13 "2023-02-21T12:02:48Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 21, 2023, 12:04pm UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/14 "2023-02-21T12:04:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 21, 2023, 12:59pm UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/16 "2023-02-21T12:59:43Z")

</div>

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](https://github.com/whatwg/html/issues/2894), 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](https://chromestatus.com/metrics/feature/timeline/popularity/950)

---

<div class="post-metadata">

**Author:** ![Yang\_Yu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yang_yu/32/28548_2.png) [@Yang\_Yu](https://forum.babylonjs.com/u/Yang_Yu)\
**Post date:** [February 22, 2023, 8:28am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/18 "2023-02-22T08:28:51Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![aWeirdo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/aweirdo/32/52_2.png) [@aWeirdo](https://forum.babylonjs.com/u/aWeirdo)\
**Post date:** [February 22, 2023, 9:26am UTC](https://forum.babylonjs.com/t/inputtext-javascript-message/38352/19 "2023-02-22T09:26:08Z")

</div>

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](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.

> **[Preparing Your Components for the Removal of alert()/confirm()/prompt()](https://developer.salesforce.com/blogs/2022/01/preparing-your-components-for-the-removal-of-alert-confirm-prompt)**
>
> In early 2021, the Web Hypertext Application Technology Working Group (WHATWG) changed the HTML specification to deprecate support for the alert(), confirm(), and prompt() APIs when used in a third-party context.

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.
