RESOLVED FIXED199090
Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
https://bugs.webkit.org/show_bug.cgi?id=199090
Summary Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as ...
Nikita Vasilyev
Reported 2019-06-20 16:27:02 PDT
I added auto-closing unbalanced quotes and parenthesis in Bug 182523, but I didn't realize there're two code paths to finish value edit. Committing the value by pressing Enter or Tab works as expected, but it doesn't when caused by a blur event (by clicking somewhere else in Web Inspector, for instance). There should be only one code-path. Steps: 1. Open https://webkit.org 2. Inspect <body> 3. Add `font-family: "helv` CSS property to the Style Attribute rule. 4. Click on the white space somewhere in Web Inspector (to trigger blur event on the CSS value field). Actual: font-family: "helv}; ^ Incorrectly shown } character Expected: font-family: "helv" ^ Inserted quote character Notes: After focusing on the value ("helv}) again, it replaces it the correct value ("helv").
Attachments
Patch (1.69 KB, patch)
2019-06-21 18:19 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2019-06-20 16:28:27 PDT
Nikita Vasilyev
Comment 2 2019-06-21 18:19:15 PDT
Created attachment 372663 [details] Patch Here's a one-line fix. I still plan to refactor spreadsheetTextFieldDidCommit and spreadsheetTextFieldDidBlur, but since it's only tangentially related to the bug, I don't plan to do it in this patch.
Matt Baker
Comment 3 2019-06-22 10:35:28 PDT
I also noticed that repeating the steps above but with Add `font-family: "Helv` (capitalized) will cause the value to autocomplete to `"Helvetica}`.
Matt Baker
Comment 4 2019-06-22 10:35:52 PDT
Comment on attachment 372663 [details] Patch r=me
WebKit Commit Bot
Comment 5 2019-06-22 11:05:34 PDT
Comment on attachment 372663 [details] Patch Clearing flags on attachment: 372663 Committed r246712: <https://trac.webkit.org/changeset/246712>
WebKit Commit Bot
Comment 6 2019-06-22 11:05:36 PDT
All reviewed patches have been landed. Closing bug.
Nikita Vasilyev
Comment 7 2019-06-22 15:32:56 PDT
(In reply to Matt Baker from comment #3) > I also noticed that repeating the steps above but with Add `font-family: > "Helv` (capitalized) will cause the value to autocomplete to `"Helvetica}`. O_o That's not good. Filled Bug 199130 - Web Inspector: Styles: curly brace incorrectly added after completed value inside unclosed quote
Note You need to log in before you can comment on or make changes to this bug.