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 241581

Summary: Javascript background color may show on other mime types
Product: web Reporter: MackSix
Component: HTML EditorAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal CC: MackSix
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=227643
Issue Type: DEFECT Exception Reporter:
Attachments: HelloWeb7.3.zip

Description MackSix 2014-02-08 19:33:19 UTC
1. Open attached project (HelloWeb7.3).
2. Change type="text/javascript" to type="text/ecmascript".
3. Notice the green highlighting goes away as expected.
4. Place cursor after script closing angle bracket.
5. Press Enter.
6. Notice green highlighting appears.

If document is closed and reopened or NetBeans is restarted, the highlighting disappears, but step 4-6 will happen again if editing in the script is attempted.


Workaround: Use type="text/html" and the color will not come back.


Product Version: NetBeans IDE Dev (Build 201402060001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b128
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 MackSix 2014-02-08 19:42:18 UTC
I guess the workaround is not a good workaround if you have to have type="text/ecmascript" specified. I don't know if this is really ever used in practice. Or any of these:

application/ecmascript
application/javascript
text/vbscript (afaik obsolete)

The only mime types I know of that would be used is text/javascript, text/css, text/html.
Comment 2 MackSix 2014-02-08 19:53:32 UTC
Created attachment 144948 [details]
HelloWeb7.3.zip
Comment 3 Marek Fukala 2014-07-24 09:06:11 UTC
reproducible