full-width-text icon indicating copy to clipboard operation
full-width-text copied to clipboard

Bug in Firefox / IE

Open bcromijn opened this issue 9 years ago • 2 comments

the part of the getStyle function

return getComputedStyle(el).getPropertyValue(prop);

returns an empty string and therefore the font isn't properly resized

bcromijn avatar Nov 18 '16 10:11 bcromijn

Yep, firefox returns "" for: getComputedStyle(el).getPropertyValue("font")

But it does return something for font-size and family:

>getComputedStyle(el).getPropertyValue("font-family")
"sans-serif"
>getComputedStyle(el).getPropertyValue("font-size")
"75.5px"

I'm looking for a way to ask firefox (and IE) to calculate the "font" property for me.

pomber avatar Nov 21 '16 22:11 pomber

I fixed it with changing the following rule: return getComputedStyle(el).getPropertyValue("font-size") + " " + getComputedStyle(el).getPropertyValue("font-family");

mdesplenter avatar Feb 27 '17 11:02 mdesplenter