jQuery-Spotlight icon indicating copy to clipboard operation
jQuery-Spotlight copied to clipboard

Offset() vs Position()

Open creativefctr opened this issue 8 years ago • 0 comments

Hi, I had a problem when I added padding to a div inside a wrapper; spotlight would not detect the correct position and omitted the padding (showed the lighted box upper than where it should have been). I checked the source code and replaced position() with offset() which solved the issue. So it appears that it's better if spotlight checks for the parent element and if it's , then it should switch to more accurate and reliable offset() rather than the relative position() which may return wrong values. Thanks

creativefctr avatar Oct 31 '16 07:10 creativefctr