Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link tooltip doesn't appear if under bottom bound of editor #851

Closed
ygrishajev opened this issue Aug 9, 2016 · 0 comments
Closed

Link tooltip doesn't appear if under bottom bound of editor #851

ygrishajev opened this issue Aug 9, 2016 · 0 comments

Comments

@ygrishajev
Copy link

I faced the issue of link tooltip not appearing when bounds option is set and selection is the most bottom line of the editor. In this case tooltip is out of the bounds.

Steps for Reproduction

  1. Visit http://beta.quilljs.com/
  2. Enter any text in the very bottom of the demo editor
  3. Try to create a link of this text

Expected behavior: Tooltip appears above the selection (as a suggestion)

Actual behavior: Tooltip doesn't appear

Platforms: Chrome 48 on Mac 10.11

Version: 1.0.0-beta.11

This may be implemented with additional check/adjustment here https://github.com/quilljs/quill/blob/develop/ui/tooltip.js#L40

if (rootBounds.bottom > containerBounds.bottom) {
    const shift = containerBounds.bottom - rootBounds.bottom - this.root.offsetHeight
    this.root.style.top = `${top + shift}px`
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants