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

Unable to get property 'getBoundingClientRect' of undefined or null reference #311

Closed
fabscav opened this issue Jan 6, 2020 · 2 comments
Assignees

Comments

@fabscav
Copy link

fabscav commented Jan 6, 2020

Describe the bug
This regards the popover code. Essentially, code is being executed after the popup instance has already been destroyed, thus causing this issue.

To Reproduce
Unfortunately I'm unable to supply this, as there's no sure-fire way of reproducing the issue.

Additional context
Unable to get property 'getBoundingClientRect' of undefined or null reference
./node_modules/uiv/dist/uiv.esm.js in isAvailableAtPosition at line 397:1

function isAvailableAtPosition(trigger, popup, placement) {
  var triggerRect = trigger.getBoundingClientRect();
  var popupRect = popup.getBoundingClientRect();
  var viewPortSize = getViewportSize();
  var top = true;
  var right = true;
  var bottom = true;
  var left = true;
@Vovanostm
Copy link

I have same problem.
Maybe just do return false if the element does not exist in function setTooltipPosition?
domUtils 213:3

export function setTooltipPosition (tooltip, trigger, placement, auto, appendToSelector, viewport) {
  if (!trigger || !tooltip) return false
  const isPopover = tooltip && tooltip.className && tooltip.className.indexOf('popover') >= 0

@wxsms
Copy link
Member

wxsms commented Feb 25, 2020

Thanks for the bug report. Solved as @Vovanostm suggested. pls try in next release.

@wxsms wxsms added the finished label Feb 25, 2020
@wxsms wxsms closed this as completed in abc0190 Feb 25, 2020
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

3 participants