• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cannot type closing bracket ")" within two brackets "()"

Guest
Aug 02, 2020 Aug 02, 2020

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.

Views

179

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 03, 2020 Aug 03, 2020

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

...

Votes

Translate

Translate
Community Expert ,
Aug 02, 2020 Aug 02, 2020

Copy link to clipboard

Copied

Please post code examples of what you're talking about.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2020 Aug 02, 2020

Copy link to clipboard

Copied

Also tell us what kind of document you're working with -- HTML, JavaScript, PHP, other...

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 03, 2020 Aug 03, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2020 Aug 03, 2020

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() );

}

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines