microsoft / microsoft/pxt

Comment creation fails in Safari <17.4: Missing `checkVisibility` function

Open
#10,264 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Open Safari (version below 17.4)
  2. Visit MakeCode Microbit Editor
  3. Attempt to add a comment on blank space (not attached to a block)
  4. Observe that only a trash icon appears instead of a comment field

Screenshot:
Error Screenshot

Expected Behavior

A complete comment field should appear instead of just the trash icon.

Expected Screenshot:
Expected Comment Field

Environment
  • OS: macOS
  • Browser: Safari
  • Version: 16.6 (18615.3.12.11.2)
Additional Information

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.