Comment creation fails in Safari <17.4: Missing `checkVisibility` function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
Bug Report
Summary
In Safari versions below 17.4, creating a comment in blank space (not linked to a block) does not work. This issue is likely caused by the checkVisibility function, which is unavailable in earlier Safari versions (pre-17.4), released before March 5, 2024. Reference: CanIUse.
Steps to Reproduce
- Open Safari (version below 17.4)
- Visit MakeCode Microbit Editor
- Attempt to add a comment on blank space (not attached to a block)
- Observe that only a trash icon appears instead of a comment field
Screenshot:
Expected Behavior
A complete comment field should appear instead of just the trash icon.
Expected Screenshot:
Environment
- OS: macOS
- Browser: Safari
- Version: 16.6 (18615.3.12.11.2)
Additional Information
- Issue occurs on both makecode.microbit.org and makecode.calliope.cc
Console Error:
[Error] TypeError: this.foldoutIcon.checkVisibility is not a function. (In 'this.foldoutIcon.checkVisibility()', 'this.foldoutIcon.checkVisibility' is undefined)
calcMinSize (main.js:7:178205)
setSize (main.js:7:177588)
yc (main.js:7:175954)
Ku (main.js:7:211726)
callback (main.js:7:124434)
(anonymous function) (main.js:7:77740)
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
Start with the Safari console error in main.js, where calcMinSize calls this.foldoutIcon.checkVisibility(). Trace that call to the source used by the MakeCode editor and verify comment creation on blank space in Safari below 17.4; done means the complete comment field appears without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100