PHPStorm breaking my javascript functions

There must be some setting that is causing this.

In a php file I have a bit of inline javascript:

$('#foo').click(function() {})

When my cursor is between the brackets (which the closing one was placed automatically) and then I press enter I end up with this..

$('#foo').click(function() {
}
})

Why is phpstorm creating the closing bracket for me twice? Once when I type { and once when I hit enter.

2 comments
Comment actions Permalink

It happens to me too

 

Seems they broke a lot of functionality in 2017.1 :(

0
Avatar
Vladimir Luchansky
Comment actions Permalink

Unfortunately I cannot reproduce this. Could you provide me with a full code sample where you can reproduce that issue all the time?

0

Please sign in to leave a comment.