PolymerElements / paper-tooltip

A Material Design tooltip
https://webcomponents.org/element/PolymerElements/paper-tooltip
40 stars 49 forks source link

Scrolling can cause paper-tooltip's position to be wrong #24

Open mrdewitt opened 9 years ago

mrdewitt commented 9 years ago

http://jsbin.com/wobutexixa/1/edit?html,css,output

I believe taking into account the offsetParent's scrollTop will make this particular bug go away.

To reproduce, hover on the content div while scrolled to the bottom.

notwaldorf commented 9 years ago

I see this is using 1.0.1 -- there was a change in 1.0.2 that maybe should have fixed this. Could you give that another try, please?

mrdewitt commented 9 years ago

I'm using 1.0.9 for development, but 1.0.1 was convenient to link into jsbin.

rictic commented 9 years ago

I believe that this is blocking an internal team migrating to 1.0

(See go/paper-tooltip-scroll-bug for internal bug)

dplassgit commented 9 years ago

I've done a one off work around so we're not really blocked, but still... On Sep 3, 2015 5:40 PM, "Peter Burns" notifications@github.com wrote:

I believe that this is blocking an internal team migrating to 1.0

— Reply to this email directly or view it on GitHub https://github.com/PolymerElements/paper-tooltip/issues/24#issuecomment-137581872 .

rictic commented 9 years ago

Ah, ok, removing the code-yellow for prioritization purposes.

alefwmm commented 8 years ago

One workaround is setting your element as the offsetParent of the paper-tooltip element, supposing it is not scrollable:

:host {
    position: relative;
}
polymer-ci commented 8 years ago

Resurecting this thread. Looks like the paper-tooltip scroll problem is still around (I'm having trouble with it). Can you point me at an example of a work-around?

On Wednesday, November 4, 2015 at 6:27:18 AM UTC-8, Álef Miranda wrote:

One workaround is setting your element as the offsetParent of the paper-tooltip element, supposing it is not scrollable:

:host { position: relative; }

— Reply to this email directly or view it on GitHub https://github.com/PolymerElements/paper-tooltip/issues/24#issuecomment-153741345 .

ikelos commented 7 years ago

It does still appear to be a problem, and version 1.1.3 was released without a fix for this (despite patches existing). Please could someone comment on why the current pull request is not suitable or has not yet been accepted? What needs doing in order to get this fixed? It's been dragging on for over a year...

tjb1982 commented 7 years ago

It does look like setting the :host's position: relative works pretty well, but obviously it would be nice if it just worked out of the box. I'm using 2.0-preview

ghost commented 7 years ago

For me setting the :host's position: relative only works to some degree. At least the tooltip is within the viewport now, but it appears in some very strange places and wrapped when not needed.

notwaldorf commented 7 years ago

@ikelos none of the open patches fix all of the problems; if you look at the comments, they all break some other existing working scenarios.

QuteBits commented 7 years ago

please fix

gkovacs commented 7 years ago

Bug is still present in current version, as of today (August 14, 2017). Setting the host's position as relative works as a workaround.

ghost commented 7 years ago

After upgrading to Polymer 2 and using app-layout instead of paper-drawer-panel the problem disappeared and works fine for me now.