mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.25k stars 2.95k forks source link

iPad/iPhone js ‘prompt’ function immediately returns #15244

Open pushcx opened 1 year ago

pushcx commented 1 year ago

Steps to reproduce

Call var result = prompt(‘prompt text’); in js.

Expected behavior

Javascript execution blocks and the user-entered text is assigned to the result variable, per MDN documentation and behavior of every other browser I have available to test.

Actual behavior

Empty string (or the default text, if provided in the prompt call) is immediately assigned to result and js execution continues even before the user interacts with the prompt modal. User-supplied text is not assigned to result.

Device & build information

Notes

https://www.javatpoint.com/oprweb/test.jsp?filename=javascript-prompt-dialog-box2

This js example site demonstrates the bug. If you click the Click me button on the demo, you’ll see the output page update to say ‘Welcome to javatpoint.com’ before you can interact with the modal dialog. (Depending on screen size, you may need to delete the <h1> and <h2> and click Run at the top to be able to see the output with the keyboard open.)

┆Issue is synchronized with this Jira Task

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions!