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 216906

Summary: javax.swing.text.BadLocationException: Wrong remove position -1 < 0
Product: web Reporter: Vladimir Riha <vriha>
Component: HTML EditorAssignee: Marek Fukala <mfukala>
Status: RESOLVED FIXED    
Severity: normal CC: kganfield, vriha
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 191557
Attachments: stacktrace
stacktrace

Description Vladimir Riha 2012-08-15 09:13:23 UTC
This issue was reported manually by vriha.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build EaselCSS-497-on-20120814)
VM: Java HotSpot(TM) Client VM, 23.2-b09, Java(TM) SE Runtime Environment, 1.7.0_06-b24
OS: Linux

User Comments:
vriha: Caused by:
- have following snippet:  <li class="todo">
- put cursor inside the "todo"
- in Rule Editor window press Add Property and add some property




Stacktrace: 
javax.swing.text.BadLocationException: Wrong remove position -1 < 0
   at org.netbeans.editor.BaseDocument.handleRemove(BaseDocument.java:918)
   at org.netbeans.editor.BaseDocument$FilterBypassImpl.remove(BaseDocument.java:2404)
   at javax.swing.text.DocumentFilter.remove(DocumentFilter.java:79)
   at org.openide.text.CloneableEditorSupport$DocFilter.remove(CloneableEditorSupport.java:3031)
   at org.netbeans.editor.BaseDocument.remove(BaseDocument.java:901)
   at org.netbeans.modules.css.model.api.Model.applyChanges(Model.java:373)
Comment 1 Vladimir Riha 2012-08-15 09:13:25 UTC
Created attachment 123138 [details]
stacktrace
Comment 2 Vladimir Riha 2012-08-15 09:14:23 UTC
similar case happens with following code:

<li style="font:12px;">
Comment 3 Kenneth Ganfield 2012-09-04 13:53:01 UTC
Created attachment 123882 [details]
stacktrace

using new rule dialob
Comment 4 Marek Fukala 2012-10-08 13:29:42 UTC
fixed as the rule editor shows nothing when the class or id attribute in html code is selected.