Opened 8 years ago
Closed 8 years ago
#17064 closed defect (duplicate)
dom-geometry position works differently in Firefox and Chrome
Reported by: | Radim Kolář | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Core | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
<body> <script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js"></script> <img src="images/novy-hlodac.png" id="hiddenlogo"/> <script> require(["dojo/fx", "dojo/dom", "dojo/dom-geometry", "dojo/dom-style", "dojo/domReady!"], function(fx, dom, geom, style) { // get target original location of flying logo var obrazek = geom.position(dom.byId("hiddenlogo"), true); var hlodacx = obrazek.x; var hlodacy = obrazek.y; alert(hlodacx+"/"+hlodacy); </script> #hiddenlogo { display: block; margin-left: auto; margin-right: auto; width: 200px; height: auto; visibility: hidden }
In firefox 20, location displayed is about 496/8. image auto margins left and right are excluded, you will get exact location of image - this is what i want.
In chrome 26, location printed is 8/23, image is still centred correctly
Note: See
TracTickets for help on using
tickets.
close this as duplicate, i got server error on save.