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").
<rdar://problem/51965431>
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.
I also noticed that repeating the steps above but with Add `font-family: "Helv` (capitalized) will cause the value to autocomplete to `"Helvetica}`.
Comment on attachment 372663 [details] Patch r=me
Comment on attachment 372663 [details] Patch Clearing flags on attachment: 372663 Committed r246712: <https://trac.webkit.org/changeset/246712>
All reviewed patches have been landed. Closing bug.
(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