paypal/paypal-js

[Bug] Border of PayPal button invisible on some resolutions

ukrainer opened this issue ยท 2 comments

React_PayPalJS_Mozilla_Firefox
React_PayPalJS_Mozilla_Firefox2

๐Ÿž Describe the Bug

The size of the internal html element in iframe is calculated wrong with some fratcional value, which leads to incorrect display of the button.
E.g. iframe width 635px, html width 635.2px

๐Ÿ”ฌ Minimal Reproduction

Use paypal-js react npm package, render PayPal button inside some div element. Resize window, on some resolution right/bottom border will be gone

๐Ÿ˜• Actual Behavior

Width/height is calculated with additional fractional part, part of the border is invisible

๐Ÿค” Expected Behavior

width/ height of button is 100% of parent element, border is always visible

๐ŸŒ Environment

  • Node.js/npm: @paypal/react-paypal-js": "7.3.3"
  • OS: WIndows
  • Browser: Firefox 119.0.1 (64-bit/

โž• Additional Context

Consider using CSS round, or some JS fix for iframe html content to inherit parent element's size