Wrong caret position on when I click 'enter'

Hello everyone, I'm experiencing the following issue in Webstorm.

On a JSP file, when I click on the 'enter' button, the caret is in the wrong position, instead of being aligned with the beginning of the 'siblings' element.

Hope the following screenshots can be more explanatory.

So, from this starting position:

When I click on 'enter' I have the following behaviour:

Maybe is something stupid and easy to fix, but I can't really find the settings to change this behaviour.

Thanks a lot in advance,



JSP support in WebStorm is very limited (see http://youtrack.jetbrains.com/issue/WEB-527); I'd suggest using Intellij Idea for JSP editing - it provides better JSP support


Thanks for the quick answer. I'm noticing a similar issue on all the types of files.

On .scss files when I click on 'enter', the caret jumps to the right position for around one second, and then it goes automatically at the beginning of the line. 

It is possible that I changed something in the settings that I can't remember. Is there a way to restore the default settings?



I fix this second issue that I found. I went to 

Settings | Editor | Strip trailing spaces on Save 

and I set it to 'none'.

Refer to: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206368249-Caret-going-back-to-the-beginning-of-the-line


But the very first problem persists


the first issue is caused by lack of HTML formatting in JSP files (http://youtrack.jetbrains.com/issue/WEB-527). The second - by stripping white spaces on Save


I see, so basically, there's no solution for Webstorm


Please sign in to leave a comment.