This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Huh, sorry, this submitted accidentally. When I'm using the php version of the 7.3 beta, when I'm editing javascript hitting enter within a function _always_ adds a closing } tag. So if you have something like: showYouTube: function() { } Then hit enter to fill in the body, you get this: showYouTube: function() { } } If you type in more, then hit enter again, you get another bracket: showYouTube: function() { // do something } } } I'm not really sure if that's intended or a bug, but it really seems like a bug. This is in an inline javascript section on a php page.
Sorry, I'm not facing your troubles in the latest builds. Could you give it another try in the beta2 or development builds? http://bits.netbeans.org/download/trunk/nightly/latest/ It looks that this was already fixed or you must have some structure which is making still troubles. So if you would be able to reproduce in the build mentioned above, please attach your JS code where it's making troubles to you. Or feel free to attach your whole JS source right now, we can give it a try. For now I'm closing that as worksforme since I wasn't able to reproduce it on pieces of sources attached below - in the .js or .php files.
As I mentioned, marking as worksforme for now, but your source would be appreciated, to check it fully in the latest builds. Thanks a lot...
Created attachment 127943 [details] php file with inline javascript that shows problem Here's an example that does it. At the very end of the php file, there's some inline javascript with some conditional sections based on php. In the javascript 'empowered' object, there are several functions. If you hit enter inside of any of those functions, it will create a closing bracket, even though the bracket already exists. It doesn't do it in every section of the javascript, so it might be something related to this specific code, but I've seen it in other files. This is with the latest nightly build, php only. Java on this particular machine is Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Thanks for attaching your source, it's definitely reproducible on that. Reopening this issue...
It has to be something about the code. The object itself in plain js or html does not cause that.
The problem is that typed break interceptor is looking for balance on whole document.
Should be fixed in web-main 695df08bb318.
Integrated into 'main-golden', will be available in build *201211211016* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/695df08bb318 User: Petr Hejl <phejl@netbeans.org> Log: #222239 - Javascript adding extra }