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 230680

Summary: Script tag highlighting does not work if cursor placed at start of closing tag
Product: javascript Reporter: MackSix
Component: EditorAssignee: Petr Hejl <phejl>
Status: REOPENED ---    
Severity: normal    
Priority: P4    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 3
Screenshot 4

Description MackSix 2013-06-03 15:33:19 UTC
If the cursor is placed at the start of a closing <script> tag, the yellow highlighting of the opening and closing script tags do not work. 

This works correctly on all other html tags.
Comment 1 Vladimir Riha 2013-06-03 15:36:43 UTC
reproducible, probably JavaScript editor? Reassigning, please reassign if I'm wrong.
Comment 2 Petr Hejl 2013-07-19 08:13:26 UTC
Seems to be working ok in dev build for me:
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
    </head>
    <body>
        <div>TODO write content</div>
        <script>
            var a = 7;
        </script>
    </body>
</html>

I tested it with html and php. Please verify.
Comment 3 MackSix 2013-07-19 14:12:29 UTC
Created attachment 137450 [details]
Screenshot 1

Cursor in front of opening tag works OK.
Comment 4 MackSix 2013-07-19 14:13:33 UTC
Created attachment 137451 [details]
Screenshot 2

Cursor in front of closing tag is broke.
Comment 5 MackSix 2013-07-19 14:15:05 UTC
Still does not work for me in:

Product Version: NetBeans IDE Dev (Build 201307182300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

See screenshots.
Comment 6 Petr Hejl 2013-07-19 14:21:32 UTC
Oh I see. The reason might be the position is considered to be in JS. So html functions don't apply.
Comment 7 MackSix 2013-07-19 16:02:34 UTC
I just noticed that the Navigator highlights the script node when the cursor is at the beginning of the closing tag, as it should do, but when the cursor is at the end of the opening tag, the Navigator does not highlight the script node. The tags are highlighted when the cursor is at the end of the opening tag though.


See additional screenshots.
Comment 8 MackSix 2013-07-19 16:04:32 UTC
Created attachment 137459 [details]
Screenshot 3

Cursor at beginning of closing tag. Navigator highlights script node OK.
Comment 9 MackSix 2013-07-19 16:07:27 UTC
Comment on attachment 137459 [details]
Screenshot 3

Wrong screenshot.
Comment 10 MackSix 2013-07-19 16:10:01 UTC
Created attachment 137460 [details]
Screenshot 3

Cursor at beginning of closing tag. Navigator highlights script node OK.
Comment 11 MackSix 2013-07-19 16:12:15 UTC
Created attachment 137461 [details]
Screenshot 4

Cursor is at the end of opening script tag. Tag highlighting in editor OK, but Navigator does not highlight the script node.