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.

[v3.0.0] Default option for appendTo is not document.body

See original GitHub issue

Hello. I have updated to the latest version and expiriencing some issues with it.

  1. By default <Tippy /> is now appending itself to reference parent while documentation says that default options is document.body. I need to set it explicitly in order to make it work.

  2. Option interactive is getting ignored while appendTo is not document.body. hideOnClick={false} can fix that but console will be showing this warning:

image

Is this an expected behavior?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
atomikscommented, Sep 30, 2019
  1. Documentation needs to be updated for this yeah.

If interactive: true, then the tippy is appended to the reference element’s parent node unless you specify your own appendTo value – that way, interactive elements inside the tippy can be focused next once the reference element is blurred.

If it’s appended to the body (as before), then any focusable elements in between the ref element and the end of the body will be next in focus order, so the popover is “disjoined” for keyboard use making it inaccessible.

You can disable this default behavior if you use your own appendTo, but you would need to create some kind of focus management solution to handle the popover for keyboard.

  1. Not 100% sure what you mean here, is there a CodeSandbox repro?
1reaction
abriginetscommented, Sep 30, 2019

Not 100% sure what you mean here

interactive: true has no effect while appendTo is not set to document.body

Read more comments on GitHub >

github_iconTop Results From Across the Web

document.body.appendChild() will work but not when I try to ...
body. appendChild() will work but not when I try to append to a specific element in the body - Stack Overflow. Stack Overflow...
Read more >
Zepto Docs
Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you already know how to...
Read more >
.appendTo() | jQuery API Documentation
The .append() and .appendTo() methods perform the same task. The major difference is in the syntax-specifically, in the placement of the content and...
Read more >
Popovers - Bootstrap
Overview · Popovers rely on the 3rd party library Popper. · Popovers require the tooltip plugin as a dependency. · If you're building...
Read more >
Dialog Widget - jQuery UI API Documentation
Default : "body". Which element the dialog (and overlay, if modal) should be appended to. Note: The appendTo option should not be changed...
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