Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Tooltip targeting parent calculates position incorrectly #97

Open
8 tasks done
Sunlis opened this issue Jan 12, 2017 · 1 comment
Open
8 tasks done

Tooltip targeting parent calculates position incorrectly #97

Sunlis opened this issue Jan 12, 2017 · 1 comment

Comments

@Sunlis
Copy link

Sunlis commented Jan 12, 2017

Description

Omitting the target property of a paper-tooltip (causing it to target its parent by default) causes weird size calculations if there isn't enough horizontal space.

It seems like the position calculations are incorrect in this case in updatePosition.

Expected outcome

Tooltip doesn't wrap unless necessary, and doesn't overflow off the page.

Actual outcome

Tooltip wraps unnecessarily. (screenshot)

Live Demo

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

Steps to reproduce

  1. Position an element near the right edge of the page.
  2. Put a paper-tooltip in that element, with position set to top or bottom.
  3. Hover on the trigger element, and observe the tooltip.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@sushantbs
Copy link

+1 for the wrapping issue.

@Sunlis Did you try the fitToVisibleBounds property to fix the overflow issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants