Copy link to clipboard
Copied
Before I post this as a bug report on dreamweaver.uservoice.com I wanted to check whether someone else also has this problem and whether this is not a wrong configuration or wrong using of DW on my side.
When I type something like "myfunction(" the closing bracket is automatically added. That's good. So I have "myFunction()". Now I place the cursor between "(" and ")", i.e. "(|)", and type another closing bracket ")". The result: No bracket is added!
If I type another closing bracket, it's now added.
This behaviour produces a lot of syntax errors in my code, because I constantly forget brackets.
Sometimes I have large code lines with a lot of brackets and then maybe I add another one at the end and then at the beginning. The end bracket is not added, as described. If you type fast the not appearing bracket is not always obvious.
Looks like a bug.
The same thing happens here when I turn on "Auto-insert Braces" from the Code Hints section of my Preferences.
It works fine if you place the additional closing brace outside of the pair finished by the automated function, or if you place an opening brace (which automatically creates another closing) , but it doesn't allow a closing brace to be added within the automated pair.
Basically, it finishes the pair for you, and if you want to add another, it acts as if the closing br
...Copy link to clipboard
Copied
Please post code examples of what you're talking about.
Copy link to clipboard
Copied
Also tell us what kind of document you're working with -- HTML, JavaScript, PHP, other...
Copy link to clipboard
Copied
The kind of document doesn't matter, this behaviour occurs in every document (html, css, js, php).
And concerning the code:
()
That's all to reproduce it on my side.
I could give you an example of a "useful" code, where this behaviour is annoying, but two brackets is all you need to see that you cannot add a close bracket into this.
Copy link to clipboard
Copied
Parenthesese ( ) are not curly brackets { }.
I have no trouble typing this nested function inside a new JavaScript file in Dreamweaver. Give it a try.
// JavaScript Document
function sayHiBye(firstName, lastName) {
// helper nested function to use below
function getFullName() {
return firstName + " " + lastName;
}
alert( "Hello, " + getFullName() );
alert( "Bye, " + getFullName() );
}
Copy link to clipboard
Copied
Looks like a bug.
The same thing happens here when I turn on "Auto-insert Braces" from the Code Hints section of my Preferences.
It works fine if you place the additional closing brace outside of the pair finished by the automated function, or if you place an opening brace (which automatically creates another closing) , but it doesn't allow a closing brace to be added within the automated pair.
Basically, it finishes the pair for you, and if you want to add another, it acts as if the closing brace isn't there. Attempting to add another just overwrites the existing brace, moving the cursor forward by 1 character.