-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The frontend UI can call confirm sometimes, and when this happens within the extension WebView, it is ignored. Here's an example:
- Open the Source Academy Panel and the VS Code Developer Tools pane
- In the Webview, open any question in an assessment.
- Click on the "Reset" button. The "Save" button should turn orange, indicating unsaved changes.
- Navigate back by clicking on the Missions button (Fire icon).
- In the standard frontend, the user is prompted on whether they want to discard the unsaved changed.
- In the extension, nothing happens. The WebView does not navigate to the Missions page either. Instead, an error entry appears in the console:
Ignored call to 'confirm()'. The document is sandboxed, and the 'allow-modals' keyword is not set.
We need to polyfill this confirm function so that it appears as a VS Code notification. Note that confirm is blocking, though most VS Code APIs are non-blocking. Also, identify other such Web APIs that the frontend may call.
Metadata
Metadata
Assignees
Labels
No labels