Chromium based browsers freeze when pxt is removed from DOM
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
The browser's tab freezes when pxt is removed from the DOM.
This happens on chromium based browsers. It does not happen in firefox.
To Reproduce
- Clone pxt repository (https://github.com/microsoft/pxt.git)
- Clone pxt sample (https://github.com/microsoft/pxt-sample.git)
- The folder structure should look like this:
- bug-report/
|- pxt/
|- pxt-sample/
- Install pxt globally (npm install -g pxt)
- Install dependencies on both projects
- Build local pxt (cd pxt; npm run build)
- Link pxt-sample with local pxt (Deletion of pxt-sample/node_modules/pxt-core/ might be necessary)
- cd pxt-sample; pxt link ../pxt
- Serve pxt-sample with custom pxt
- pxt serve
- Open on Chrome the controller example
- http://localhost:3232/controller.html
- Remove iframe node from browser console
document.getElementById('iframe').parentElement.removeChild(document.getElementById('iframe'))
- The browser window should be unresponsive at this moment
Desktop:
- OS: macOS Big Sur Version 11.2.1
- Browser:
- Google Chrome Version 89.0.4389.90 (Official Build) (x86_64)
- Brave Version 1.21.77 Chromium: 89.0.4389.90 (Official Build) (x86_64)
Additional questions
Should I send a message to pxt before closing?
If so, which one?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the freeze using the steps in the issue, serving pxt-sample and opening controller.html in a Chromium-based browser. Start by tracing the iframe removal and its related TypeScript/browser lifecycle code; done means removing the iframe no longer makes the tab unresponsive while Firefox behavior remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100