NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Handlebars and Netbeans 8.2: Keyboard input denied

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
german.mark



Joined: 16 Nov 2016
Posts: 4

PostPosted: Wed Nov 16, 2016 1:45 pm    Post subject: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

After updating to Netbeans 8.2 (from 8.1), I ran/stumbled into this:

I'm using jsrender, putting its templates into script tags like so:
<script id="some" type="text/html"> ... </script>

As long as I keep all my Javascript in separate files (recommended anyway), Netbeans treats the template correctly in regard to indentation, formatting etc.

With Netbeans 8.2, I can no longer enter the double curly opening brackets required for the template variables; after the first "{" any try to enter the second "{" gets blocked right at the key press.
If I change the script tag type to anything else but text/html, it works again but I lose the auto-formatting.
It's not even possible to "trick" Netbeans then, like with typing {.{ then erasing the dot; the editor will not allow any editing action that would result in the desired outcome of "{{".

Multiple closing curly brackets are no problem at all.

So what does work is to type the double closing brackets }} first, then go back and enter the opening brackets {{ in front. Note that after this, I have a hard time deleting this with backspace; I need to place the cursor inside the {{}} then start to delete any of the inner brackets first. Starting from the right is not possible; editor ignores the backspace key as soon as the cursor reaches the outer closing curly.

Also, depending on the surrounding code, sometimes the editor just straight allows for the {{, sometimes not. The culprint seems to vary wildly; sometimes it's any template closing tag, e.g. typing works until after an {{/if}} appears in the code, sometimes not. The more I test it, the less of a pattern I can see.

I've tried disabling HTML hints, completion etc., to no avail.

Observed on two different Macs with differing OS versions.

I'm a bit at a loss for now. Will revert to 8.1, because back-to-front typing of brackets isn't my forte Smile

Any hints appreciated ...



Bildschirmfoto 2016-11-16 um 14.42.19.png
 Description:
Marked: One place where I can't type another curly open bracket.
 Filesize:  34.8 KB
 Viewed:  3902 Time(s)

Bildschirmfoto 2016-11-16 um 14.42.19.png


Back to top
ArtemKo



Joined: 10 Mar 2017
Posts: 1

PostPosted: Fri Mar 10, 2017 8:22 am    Post subject: Reply with quote

Any updates on this issue?
Back to top
german.mark



Joined: 16 Nov 2016
Posts: 4

PostPosted: Tue Mar 14, 2017 6:23 pm    Post subject: Sorry, no change after applying all current updates Reply with quote

Well, I've just applied all updates available for the 8.2 version on my platform (Mac), but the behavior remains the same: Can not type one curly bracket right next to one already existing.

So, back to 8.1 it is for me ...
Back to top
geertjan



Joined: 22 Jan 2014
Posts: 978

PostPosted: Wed Mar 15, 2017 8:49 am    Post subject: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

Happy to take a look at this in a Skype call (I don't understand the
problem, would like to see it) -- geertjanwielenga.

Thanks,

Geertjan


On 14-3-2017 19:23, german.mark wrote:
Quote:
Well, I've just applied all updates available for the 8.2 version on my platform (Mac), but the behavior remains the same: Can not type one curly bracket right next to one already existing.

So, back to 8.1 it is for me ...



Back to top
german.mark



Joined: 16 Nov 2016
Posts: 4

PostPosted: Wed Mar 15, 2017 6:58 pm    Post subject: Re: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

geertjan wrote:
Happy to take a look at this in a Skype call (I don't understand the
problem, would like to see it) -- geertjanwielenga.

Thanks,

Geertjan


Thank you for taking the time to reply!

I'm not sure how well Skype would work for me, so I did a quick video screencap and uploaded it to youtube (it's unlisted but not private), here's the URL: https://www.youtube.com/watch?v=3qM3Dd-jc4A

It's 90 seconds of me typing (and mis-typing occasionally) text and curly brackets. It should illustrate the problem quite nicely Wink

Thanks,
Markus
Back to top
geertjan



Joined: 22 Jan 2014
Posts: 978

PostPosted: Wed Mar 15, 2017 11:06 pm    Post subject: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

So, it looks like the file type you're having a problem with has a
".tpl" extension.

Are you saying that you have a problem in Smarty templates, specifically?

Gj


On 15-3-2017 19:58, german.mark wrote:
Quote:
geertjan wrote:
Quote:
Happy to take a look at this in a Skype call (I don't understand the
problem, would like to see it) -- geertjanwielenga.

Thanks,

Geertjan


Thank you for taking the time to reply!

I'm not sure how well Skype would work for me, so I did a quick video screencap and uploaded it to youtube (it's unlisted but not private), here's the URL: https://www.youtube.com/watch?v=3qM3Dd-jc4A

It's 90 seconds of me typing (and mis-typing occasionally) text and curly brackets. It should illustrate the problem quite nicely [Wink]

Thanks,
Markus



Back to top
geertjan



Joined: 22 Jan 2014
Posts: 978

PostPosted: Thu Mar 16, 2017 12:03 am    Post subject: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

And you're not able to create a code template for "{{" so that when you
can expand some key combination to your double brace (to be honest,
tried to use Smarty templates a few minutes ago and I don't see your
problem at all, in NetBeans IDE 8.2).

From my point of view the only way forward is to take a look via Skype
-- simply not able to reproduce it and clearly there's not enough
information (only since seeing the YouTube clip is it clear that the
file extension we're talking about is, apparently, only '.tpl' files,
nowhere has that been mentioned so far, so I wonder what other
unmentioned things are going on).

Gj


On 16-3-2017 0:04, geertjan wielenga wrote:
Quote:

So, it looks like the file type you're having a problem with has a
".tpl" extension.

Are you saying that you have a problem in Smarty templates, specifically?

Gj


On 15-3-2017 19:58, german.mark wrote:
Quote:
geertjan wrote:
Quote:
Happy to take a look at this in a Skype call (I don't understand the
problem, would like to see it) -- geertjanwielenga.

Thanks,

Geertjan


Thank you for taking the time to reply!

I'm not sure how well Skype would work for me, so I did a quick video
screencap and uploaded it to youtube (it's unlisted but not private),
here's the URL: https://www.youtube.com/watch?v=3qM3Dd-jc4A

It's 90 seconds of me typing (and mis-typing occasionally) text and
curly brackets. It should illustrate the problem quite nicely [Wink]

Thanks,
Markus




Back to top
german.mark



Joined: 16 Nov 2016
Posts: 4

PostPosted: Thu Mar 16, 2017 1:05 pm    Post subject: Thank you! It works! Reply with quote

Hi,

thank you for the "Code Completion" pointer! It was this setting:

Options -> Editor -> Code Completion -> Insert Single Proposals automatically

Un-checked it, and now the editor works as I expect it to.

All is well Smile

Thanks again!
-Markus



Bildschirmfoto 2017-03-16 um 14.04.05.png
 Description:
 Filesize:  62.77 KB
 Viewed:  3399 Time(s)

Bildschirmfoto 2017-03-16 um 14.04.05.png


Back to top
geertjan



Joined: 22 Jan 2014
Posts: 978

PostPosted: Thu Mar 16, 2017 2:59 pm    Post subject: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

Excellent. :-)

Gj


On 16-3-2017 14:05, german.mark wrote:
Quote:
Hi,

thank you for the "Code Completion" pointer! It was this setting:

Options -> Editor -> Code Completion -> Insert Single Proposals automatically

Un-checked it, and now the editor works as I expect it to.

All is well :-)

Thanks again!
-Markus




Attachments:
http://forums.netbeans.org//files/bildschirmfoto_2017_03_16_um_140405_190.png
Back to top
648r137



Joined: 24 Mar 2017
Posts: 1

PostPosted: Fri Mar 24, 2017 12:30 pm    Post subject: Handlebars and Netbeans 8.2: Keyboard input denied Reply with quote

Tools->Options->Misc->Files

Change Associated file type (MIME) for appropriate file extension from HTML Files (text/html) to XHTML Files (text/xhtml)


As a proof of concept just try to create new html file and put this:
<div>
<div>
<div class="well col-xs-3">
<div class="well col-xs-8"></div>
</div>
<div class="well col-xs-offset-1 col-xs-4">Test2</div>
<div class="well col-xs-offset-1 col-xs-3">Test3</div>
</div>
<div>
<div class="well col-xs-3">Test4</div>
<div class="well col-xs-offset-1 col-xs-4">Test5</div>
<div class="well col-xs-offset-1 col-xs-3">Test6</div>
</div>
</div>

Save and try to add {{ inside <div class="well col-xs-8"></div>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo