Can't indent (tab) in Safari?

Hello,

I’m having a problem with the code editor in Safari that I’ve not previously had before, so maybe I’ve done something inadvertently. I’m unable to use the “tab” button to indent lines of code. Every time I press tab, the cursor moves from the code editor, to the preview window. So in essence it moves fields, which I understand is one of the basic functionalities of the “tab” button, but I thought in a text editor it would recognize that I’m not trying to move fields, but simply indent text. Does anyone know how to prevent this from happening? If I use Codecademy in Google Chrome, I do not have this problem, just in Safari.

Any help is appreciated, thank you!

I know this might not be too helpful… but FYI, I’m using safari right now and tab is identing normally on codecademy editor.
It might be something on your end.

That’s what I was thinking, like maybe I hit something to make it stop indenting normally. Similar to hitting “insert” and causing your computer to type over text instead of adding. That type of thing. I even thought maybe I need to hit “insert” but I’m on a MacBook, so that’s not an option.

yea, it is weird…
I tried to force the behavior and I noticed that by holding “option” key, it switches the focus for other elements, instead of indenting the code.

I just tried holding “option” and pressing “tab” and that acts slightly differently than just me hitting “tab”. That actually highlights other elements in the “preview” window. Whereas just pressing tab simply moves the cursor from the code editor, into the address bar in the preview window. I’ve never had this issue before, it used to indent the code like it’s supposed to, and I haven’t switched any settings that I’m aware of.

Hey there.

There are some troubleshooting tips here:

Can you give those a try and see if they help? :slight_smile:

I tried all of the troubleshooting steps, I’ve reloaded the webpage, I’m using a personal home network with great connection, all software (Mac OS, Safari) are up to date. All plug ins up to date. I don’t really have any browser extensions. I’ve cleared browser history, cache, and cookies. Zoom level is standard (100%). I just got a brand new iMac as well, and the same thing is happening when trying to indent in the text editor on Safari - it skips to the address bar in the preview window of Codecademy. Is this just a Mac thing? I’ve never had this problem before though, on MacBook or my previous iMac.

Ok, thanks for trying the troubleshooting stuff.

I’ll see if I can turn anything up, and if so will get back to you. :slight_smile:

Hello! :slight_smile:

Codecademy has recently changed the code editor. New editor (Monaco) has some great commands that allow users to customize its behaviour and it seems that this is the problem here.

One of the commands is “Toggle Tab Key Moves Focus”, this command changes behaviour of the tab key - it toggles between adding indentation and shifting focus to different elements.

To fix your current problem please follow these steps:

  1. open any codecademy exercise;
  2. click on the code editor;
  3. press F1 key (this should open command palette);
  4. type in Toggle Tab Key Moves Focus;
  5. execute the command by clicking o it or by pressing Enter.

This should restore the behaviour of the tab key to default.

2 Likes

Sorry it’s taken so long to get back, haven’t had a minute to try this out, but I just did and it resolved the issue! Thank you so much!

2 Likes

That’s great! You are very welcome :slight_smile:

3 posts were split to a new topic: Can’t indent using tab key in code editor

3 posts were merged into an existing topic: Can’t indent using tab key in code editor