I am facing an issue with extracting and setting the left
CSS property of an element using Javascript. The element has the left
property defined inline, which I can see in Safari's inspect tool on my Mac while debugging for Safari on my phone.
However, when I use the following functions:
console.log(getComputedStyle(reporting_table.find('thead.tableFloatingHeaderOriginal')[0]).getPropertyValue('left'));
console.log(reporting_table.find('thead.tableFloatingHeaderOriginal').css('left'));
...both methods return 'auto' instead of the actual inline style value. Interestingly, this code works correctly in Chrome. Can anyone explain why JavaScript behaves differently in mobile Safari?
https://i.sstatic.net/CIU3z.png
Here is the inline style image.
https://i.sstatic.net/v6wR6.png
And here is the console log showing the incorrect 'left' property value.