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 239848 - Auto-close Quote Issue in CSS Files
Summary: Auto-close Quote Issue in CSS Files
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-29 06:36 UTC by jrm1987
Modified: 2014-07-31 18:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (38.69 KB, text/plain)
2013-12-29 06:36 UTC, jrm1987
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jrm1987 2013-12-29 06:36:33 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Windows 8 version 6.2 running on x86
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) Client VM 24.45-b08

There is a problem with how Auto-close quotes works in CSS. If type in a double-quote, I get a close quote with it. However, if I delete on of the quotes, both of them get deleted. Also, when the cursor is right before some text and I try typing a quote, I still get a double quote - thats not how it works in the PHP files, but this problem only happens on CSS Files and really irritates me at times.
Comment 1 jrm1987 2013-12-29 06:36:38 UTC
Created attachment 143502 [details]
IDE log
Comment 2 jrm1987 2013-12-29 06:37:42 UTC
I don't know how reporting a bug works, so if I did something wrong, I'm sorry. I'd repost the problem description here

 There is a problem with how Auto-close quotes works in CSS. If type in a double-quote, I get a close quote with it. However, if I delete on of the quotes, both of them get deleted. Also, when the cursor is right before some text and I try typing a quote, I still get a double quote - thats not how it works in the PHP files, but this problem only happens on CSS Files and really irritates me at times.
Comment 3 Vladimir Riha 2013-12-29 14:12:05 UTC
Reproducible. I'd think the deleting both quotes is intentional but could be wrong (e.g. JavaScript behaves the same).

(In reply to jrm1987 from comment #2)
>I still get a double quote


Do you mean you get 2 quotes, closing and opening one, right? E.g. when having

.pes{
background-image: url(test.png);
}

then typing quote before test.png results in

.pes{
background-image: url(""test.png);
}
Comment 4 Marek Fukala 2014-07-28 09:03:01 UTC
You are right, the current behaviour is quite irritating.

I believe it could behave like this:

w/o text before caret:

url(|) + " => url("|")

press backspace => url(|)
or
press delete => url("|)

w/ test before caret:

url(|hello.png) + " => url("|hello.png)
Comment 5 Marek Fukala 2014-07-30 12:20:03 UTC
fixed the cases from comment#4

changeset:   276262:b367b585db39
summary:     #239848 - Auto-close Quote Issue in CSS Files
Comment 6 Quality Engineering 2014-07-31 09:00:39 UTC
Integrated into 'main-silver', will be available in build *201407310738* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b367b585db39
User: Marek Fukala <mfukala@netbeans.org>
Log: #239848 - Auto-close Quote Issue in CSS Files
Comment 7 Vladimir Riha 2014-07-31 13:08:52 UTC
The mentioned cases are working as described, I tried to play with some other cases and seems to be OK.

Product Version: NetBeans IDE Dev (Build 201407310738)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)
Comment 8 Marek Fukala 2014-07-31 18:12:25 UTC
Thanks a lot!