#7208 closed defect (duplicate)
dojo.coords x and y values change with page scrolling, but only in some browsers
Reported by: | dtgriscom | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | HTML | Version: | 1.1.1 |
Keywords: | coords browser x y | Cc: | haysmark |
Blocked By: | Blocking: |
Description
dojo.coords returns the x and y values of a given node. In some browsers, these values change when the page is vertically scrolled; in others it doesn't.
Browsers where values change: IE/Win, Foxfire/Win?, Foxfire/Mac? Browsers where values do not: Safari/Win?, Safari/Mac?, OmniWeb/Mac?.
(Question: which would be the correct behavior?)
Change History (3)
comment:1 Changed 13 years ago by
Cc: | haysmark added |
---|---|
Component: | General → HTML |
Owner: | changed from anonymous to sjmiles |
comment:2 Changed 13 years ago by
Milestone: | tbd → 1.2 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
IE and Firefox have the correct behavior for includeScroll==false. Safari does not.
Dup of #6921. This is a known issue with Safari in 1.1. Will be fixed in 1.2. (BTW, please commit my third patch on that ticket!)
comment:3 Changed 13 years ago by
Yup, thanks for the patch on #6921, I checked it in. So did we workaround the safari 1.1 bug?
Note: See
TracTickets for help on using
tickets.
Maybe Mark can help here as he's been in the guts of dojo._abs() (which is really doing the work here).
To answer your question, I'll quote the API doc:
I'm assuming you are calling dojo.coords() with includeScroll==false (or not specified at all)? Thus IE and Firefox are showing the correct behavior. To put it another way, if you move the scroll bar so a node is at the top of the screen, dojo.coords(node).y should return 0.