You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a web page where several images are rendered in a tabbed view. On page load the image in the default tab is being processed correctly. However, when the tab is switched, the width and height values are corrupted, with width returning 80 and height returning NaN.
I suspect the issue might arise from the fact that my images have no explicit width and height tag; rather, width and height are defined in CSS using width:80%; height: auto'. The return values from the CSS resemble the corrupted ones (80% and auto-> 80 andNaN. Perhaps the getComputedStyle` function cannot parse the values correctly.
This is supported by the fact that when I declared width and height explicitly in the img tag, the issue went away.
The text was updated successfully, but these errors were encountered:
I have a web page where several images are rendered in a tabbed view. On page load the image in the default tab is being processed correctly. However, when the tab is switched, the width and height values are corrupted, with width returning 80 and height returning
NaN
.I suspect the issue might arise from the fact that my images have no explicit
width
andheight
tag; rather, width and height are defined in CSS usingwidth:80%; height: auto'. The return values from the CSS resemble the corrupted ones (80% and
auto-> 80 and
NaN. Perhaps the
getComputedStyle` function cannot parse the values correctly.This is supported by the fact that when I declared width and height explicitly in the
img
tag, the issue went away.The text was updated successfully, but these errors were encountered: