Handle font-family strings containing both single and double quotes.
Fixes a failing unit test with WebKitGTK 2.18. * ui/composer-web-view.js (EditContext::init): Check for and strip both " and ' from start and end of font-family string.
This commit is contained in:
parent
ccabe6ed6c
commit
7ad97fb5d9
1 changed files with 1 additions and 1 deletions
|
|
@ -616,7 +616,7 @@ EditContext.prototype = {
|
|||
|
||||
let styles = window.getComputedStyle(node);
|
||||
let fontFamily = styles.getPropertyValue("font-family");
|
||||
if (fontFamily.charAt() == "'") {
|
||||
if (["'", "\""].indexOf(fontFamily.charAt()) != -1) {
|
||||
fontFamily = fontFamily.substr(1, fontFamily.length - 2);
|
||||
}
|
||||
this.fontFamily = fontFamily;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue