mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-22 04:11:52 +00:00
Merge pull request #649 from Kienz/patch-1
Fix `fabric.util.getElementOffset` for Firefox
This commit is contained in:
commit
9c1642ac0f
1 changed files with 3 additions and 1 deletions
|
|
@ -142,7 +142,9 @@
|
|||
* @return {String} Style attribute value of the given element.
|
||||
*/
|
||||
function getElementStyle(element, attr) {
|
||||
element.style = element.style || { };
|
||||
if (!element.style) {
|
||||
element.style = { };
|
||||
}
|
||||
|
||||
if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
|
||||
return fabric.document.defaultView.getComputedStyle(element, null)[attr];
|
||||
|
|
|
|||
Loading…
Reference in a new issue