Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8637 closed bug (invalid)

Incorrect .left and .top values for SVG objects

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: offset Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


I have a svg element in a HTML5 page and wanted to geographically locate it for a title replacement. If i use $('anyelement','svg').left or .top, the value is zero where it shouldn't on firefox 4.

Here is my workaround :

isSVG = (this.getBBox!==undefined); left = isSVG ? this.getBoundingClientRect().left+window.pageXOffset : $(this).left top = isSVG ? this.getBoundingClientRect().top+window.pageYOffset : $(this).top

Change History (6)

comment:1 Changed 12 years ago by Xavier Mouton-Dubosc <[email protected]…>

Sorry, forgot to log in so the ticket is reported to anonymoius. I'm me.

comment:2 Changed 12 years ago by dmethvin

Owner: set to anonymous
Status: newpending

Please provide a complete example, preferably in jsFiddle. We can't investigate a code snippet.

comment:3 Changed 12 years ago by Da Scritch

Never understood how to use jsFiddle i try : http://jsfiddle.net/Vzsad/

jQuery function : undefined

My function : 39

comment:4 Changed 12 years ago by Rick Waldron

Component: unfiledoffset

comment:5 Changed 12 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:6 Changed 12 years ago by Da Scritch

I lose track of the ticket because i filled it unloggued.

by the way, is there a link with http://bugs.jquery.com/ticket/3116 ?

Note: See TracTickets for help on using tickets.