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

Problem with Popover "Corner placement" on Firefox 68.0.0 #5908

Closed
BogdanPolandUkraine opened this issue Aug 20, 2020 · 2 comments · Fixed by #6196
Closed

Problem with Popover "Corner placement" on Firefox 68.0.0 #5908

BogdanPolandUkraine opened this issue Aug 20, 2020 · 2 comments · Fixed by #6196

Comments

@BogdanPolandUkraine
Copy link

BogdanPolandUkraine commented Aug 20, 2020

Bug description:

On your page with library (https://valor-software.com/ngx-bootstrap/#/popover), popover "Corner placement" doesn't work correct on Mozilla Firefox > 68.0.0.
For example:
when popover is on right side, position of arrow is always on top in "right bottom" and "right top":
image
image

In chrome, everything is correct:
image
image

ngx-bootstrap: 5.6.2

Angular: 9

Bootstrap: 4.0

@iampranavsethi
Copy link
Contributor

I can also confirm this is not working in Firefox version 90.0b3 (Developer Edition) on the ngx-bootstrap homepage and neither in the local Angular Application. (Works in Chrome)

ngx-bootstrap: v6.2.0
Angular: v9
Bootstrap: v4.3

@iampranavsethi
Copy link
Contributor

When #5027 was merged with #66ae92d
Line No: 47, arrow.ts file
sonicpro@3e3fe8b

const targetBorderRadius = parseFloat(css.borderRadius);  // css.borderRadius is "" in Firefox

this results in targetBorderRadius being set to NaN and essentially the correct value is not set as anything added to NaN is also NaN, I will see if I am able to raise a pull request for this over the weekend but that line is causing it to break. Not sure if the Firefox implementation is at fault or something else.

A quick fix would be to add a fallback value of 0 in case that results in a NaN, so like

const targetBorderRadius = parseFloat(css.borderRadius) || 0; 

Hope this helps anyone else who is facing this issue.

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

Successfully merging a pull request may close this issue.

3 participants