Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am unable to edit code on Safari macOS High Sierra #89

Closed
E-Owsteen opened this issue May 7, 2021 · 5 comments
Closed

I am unable to edit code on Safari macOS High Sierra #89

E-Owsteen opened this issue May 7, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@E-Owsteen
Copy link

E-Owsteen commented May 7, 2021

So I am on a Macbook air 2017 which is 4~ years old but still working great. The mac uses macOS High Sierra version 10.13.6. I'm using safari version 13.1.2 and I am unable to edit the code on the ".ino" and ".json" files. When I open any projects up, I am able to add parts using the purple plus and move them around using my mouse but when it comes to editing the text, it doesn't work. I don't see the text cursor and any input into my keyboard doesn't register into text. I can however highlight the code and run the simulation.

.ino Screenshot

.json Screenshot

So after the dev tools, I discovered an error of what I think is a tiny tiny typo. I'm not sure If this is a safari problem because it works for other people. Check this image out.

Tiny typo

@urish
Copy link
Contributor

urish commented May 7, 2021

Thanks for reporting!

Seems like the editor is unable to load for some reason. Can you open the Safari dev tools (Option + ⌘ + C) and check if there's some error message or warning that appears while the page is loading?

@sutaburosu
Copy link

The editor not loading reproduces for me here in the latest Safari (13.1.2) on macOS High Sierra. Safari 14.x doesn't have this problem, but I think that needs a more recent macOS.

I spent 5-minutes trying to find how to press the dev-tools key combo in virtmanager, or find a way to trigger the dev console via menus. I even tried thinking differently; it didn't help.

This Monaco issue seems to describe exactly the same symptoms. It has a screenshot of the dev console. The error seems to indicate this a problem that only the Monaco and/or Safari devs can reasonably fix.

@urish urish self-assigned this May 8, 2021
@urish urish added the bug Something isn't working label May 8, 2021
@urish
Copy link
Contributor

urish commented May 8, 2021

Thank you so much for investigating it, @sutaburosu!

I deployed a workaround, where it checks for this issue, and then goes back to a previous version of the editor known to work with Safari 13 (0.21.3, according to the issue you linked):

function isOldSafari() {
  try {
    new RegExp('([^\\b_])(\\p{Lu})(\\p{Ll})', 'gmu');
    return false;
  } catch (err) {
    return true;
  }
}

I hope this fixes the issue for now!

@sutaburosu
Copy link

sutaburosu commented May 8, 2021

Yes, this works for me in Safari 13 and 11. Safari's dev console visibility is controlled by Preferences -> Advanced -> Show debug. 👍

@urish
Copy link
Contributor

urish commented May 8, 2021

Hooray! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants