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.

Bug 262276 - Can not edit file contents with knockoutjs attributes that contain concatenations.
Summary: Can not edit file contents with knockoutjs attributes that contain concatenat...
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: Knockout (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-30 23:34 UTC by brettryan
Modified: 2016-09-22 19:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 208114


Attachments
stacktrace (4.99 KB, text/plain)
2016-05-30 23:34 UTC, brettryan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2016-05-30 23:34:11 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.74-b02, Java(TM) SE Runtime Environment, 1.8.0_74-b02
OS: Mac OS X

User Comments:
GUEST: can't delete or change symbols in a row

GUEST: i dont know what happend

brettryan: I have the following data binding

    <a class='list-group-item' data-bind="attr: { href: '<c:url value='/accounts/'/>' + ibuId + '/' + accountNumber + '/branches' }">

My keystrokes have no affect for the whole of the data-bind="" string, e.g. I can not type at the d or anywhere between until after the last ".

I tried copying out the expression to a line above to edit thinking I could paste it back:

    attr: { href: '<c:url value='/accounts/'/>' + ibuId + '/' + accountNumber + '/branches' }
    <a class='list-group-item' data-bind="attr: { href: '<c:url value='/accounts/'/>' + ibuId + '/' + accountNumber + '/branches' }">
      <div class='row'>

Alas, now I can't edit that line or even delete it.

Closing the file and reopening has no affect. Restarting NetBeans also has no affect.

I can also not edit other portions of the file, I've deleted as much as I can but the rest of this file I can't seem to delete.


Steps to Reproduce
------------------

Create a file with the followin




Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: -17
   at org.netbeans.lib.editor.util.GapList.get(GapList.java:462)
   at org.netbeans.lib.lexer.EmbeddedTokenList.tokenOrEmbedding(EmbeddedTokenList.java:295)
   at org.netbeans.lib.lexer.JoinTokenList.tokenOrEmbedding(JoinTokenList.java:269)
   at org.netbeans.lib.lexer.JoinTokenList.tokenOrEmbeddingDirect(JoinTokenList.java:581)
   at org.netbeans.lib.lexer.inc.TokenListUpdater.updateJoined(TokenListUpdater.java:369)
   at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:347)
Comment 1 brettryan 2016-05-30 23:34:13 UTC
Created attachment 159919 [details]
stacktrace
Comment 2 brettryan 2016-05-30 23:44:51 UTC
I'm certain this is related to the knockout module, have moved.
Comment 3 brettryan 2016-05-30 23:47:53 UTC
I believe this to be related to https://netbeans.org/bugzilla/show_bug.cgi?id=243651
Comment 4 Jiri Kovalsky 2016-09-15 12:32:11 UTC
Milo, could this be somehow related to bug #243651?
Comment 5 brettryan 2016-09-21 07:07:07 UTC
Hmm, looks like when I submitted this the IDE didn't include my full set of instructions, now I can't remember the file contents I had to reproduce.

What is the limit in the IDE's built-in submit bug dialog?
Comment 6 brettryan 2016-09-21 07:40:38 UTC
Have managed to reproduce, steps and file are at https://netbeans.org/bugzilla/show_bug.cgi?id=243651