question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link button broken

See original GitHub issue

The link button on my toolbar is failing to link the selected text.

Steps for Reproduction

// Toolbar Options.
[
  [{ header: [false, 1, 2] }],
  ["bold", "italic", "underline"],
  ["blockquote"],
  ["link"]
]
  1. Create new Quill editor with the above toolbar options.
  2. Insert text and then select it.
  3. Click the ‘link’ toolbar button.

Expected behavior: Highlighted text is converted into an anchor tag.

Actual behavior: Highlighted text is unaffected and the following error appears in the console

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null.

If you refer to the js/quill.js file in the 1.0.3 release tarball, the error is happening around line 9420 (which seems to originate here).

Platforms: Google Chrome 53.0.2785.101 (64-bit) running on OSX 10.11.6

Version: 1.0.3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
mpriscellacommented, Sep 9, 2016

Ahh, that makes sense. Modified my toolbar options to the following and the link tooltip is now working as expected:

// Toolbar Options.
{
  modules: {
    toolbar: [
      [{ header: [false, 1, 2] }],
      ["bold", "italic", "underline"],
      ["blockquote"],
      ["link"]
    ]
  },
  bounds: document.body,
  theme: "snow"
}

Thanks for the insight!

4reactions
jhchencommented, Sep 8, 2016

I’m not seeing any errors on Mac + Chrome (same version is reported). Codepen displays errors to the console. You can just create an error to confirm.

There is a bounds property to tell Quill where it can show up horizontally. By default it is the whole page and from the screenshot it looks like you have something with a higher z-index covering it. If there’s not space to show the tooltip vertically, it is by default hidden. You can overwrite the CSS rule if you plan to have the editing container autogrow, but will cause problems when you scroll:

.ql-snow .ql-out-bottom {
  visibility: visible;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML/CSS button link not working - Stack Overflow
I'm trying to put a link to another page of my website inside this button I've made using CSS. However, the button already...
Read more >
How do I find and fix a broken link? - Siteimprove Support
Steps to fix a broken link​​ Select the "Confirmed broken links" tab. Note: See related article on“How to manage your broken links”. Select...
Read more >
Button links not working - General - Forum | Webflow
Hi Webflow community, I have a button on my website that's linked to another page, and somehow it stopped working.
Read more >
How to Find and Fix Broken Links (5 Methods) - Kinsta
Broken links are bad for user experience and SEO. ... A picture of Phillip Stemann looking into the camera wearing a blue button...
Read more >
Right Click start button links broken - Microsoft Q&A
Right Click start button links broken. Just did an in place upgrade from win 7 ultimate to win 10 pro. Most of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found