mdn / mdn/fred

prompt() not showing in MDN Playground - returns null immediately

Open
#1,073 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
233
Forks
61
Avg merge
1d 1h
Merged PRs (30d)
82

Description

MDN URL

https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/What_is_JavaScript

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

When testing JavaScript examples that use prompt(), the dialog never appears in the MDN Playground.
The function returns null immediately.

What did you expect to see?

I expected the prompt dialog box to appear when the button is clicked,
allowing me to type a name and update the text content dynamically.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

Safari browser console message after button click: Use of window.prompt is not allowed in a sandboxed frame when the allow-modals flag is not set.

MDN metadata
Page report details

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MDN page at Learn_web_development/Core/Scripting/What_is_JavaScript and its content entry at en-us/learn_web_development/core/scripting/what_is_javascript/index.md. Reproduce the prompt() example in the MDN Playground, inspect the sandbox behavior described in the Safari console, and confirm that the dialog appears and the example updates its text when the button is clicked.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.