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

[Bug] Styling, button (pill) corners become square on hover [Firefox] #429

Open
joel492 opened this issue Oct 6, 2023 · 3 comments
Open

Comments

@joel492
Copy link

joel492 commented Oct 6, 2023

🐞 Describe the Bug

When using the paypal button in a vue.js project, and loading the page with Firefox (v. 118.0.1), the rounded corners of the button become square on hover.

I created a minimal sample project using this guide: https://cli.vuejs.org/guide/creating-a-project.html using npm install vue@2.6.14 -g and then npm install @paypal/paypal-js.

🔬 Minimal Reproduction

Hover over a paypal button that has style shape pill, using Firefox.

😕 Actual Behavior

The corners become square when hovering the button.
square_paypal_button

The problem does not occur when using layout: 'horizontal'
not_square_horizontal_button

🤔 Expected Behavior

The corners stay rounded with their border-radius.

🌍 Environment

  • Node.js/npm: v18.16.0/9.5.1
  • OS: OS X 14
  • Browser: Firefox 118.0.1
  • vue.js 2.6.14
  • paypal-js 7.0.3

➕ Additional Context

Here is the code I'm using:

<template>
  <div class="greetings">
    <h1 class="green">{{ msg }}</h1>
    <h3>
      You’ve successfully created a project with
      <a target="_blank" href="https://vitejs.dev/">Vite</a> +
      <a target="_blank" href="https://v2.vuejs.org/">Vue 2</a>.
    </h3>
    <div id="paypal-container" />
  </div>
</template>

<script>
import { loadScript } from "@paypal/paypal-js";

export default {
  props: {
    msg: {
      type: String,
      required: true
    }
  },
  methods: {
    renderPaypalButton(paypal) {
      paypal
          .Buttons({
          style: { shape: 'pill' }})
          .render("#paypal-container")
          .catch((error) => {
            console.error("failed to render the PayPal Buttons", error);
          });
    }
  },
  mounted() {
    this.paypal = loadScript({
      clientId: '<my-retracted-paypal-id>',
      currency: 'EUR',
      disableFunding: [
        'card',
        'credit',
        'paylater',
        'bancontact',
        'blik',
        'eps',
        'giropay',
        'ideal',
        'mercadopago',
        'mybank',
        'p24',
        'sepa',
        'sofort',
        'venmo'
      ]
    }).then(paypal => {
      this.renderPaypalButton(paypal);
    });
  }
}
</script>

<style scoped>
h1 {
  font-weight: 500;
  font-size: 2.6rem;
  top: -10px;
}

h3 {
  font-size: 1.2rem;
}

.greetings h1,
.greetings h3 {
  text-align: center;
}

@media (min-width: 1024px) {
  .greetings h1,
  .greetings h3 {
    display: block;
    text-align: left;
  }
}
</style>
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Stale label Feb 16, 2024
@valoricDe
Copy link

@gregjopa Hi there. Is there something needed to be able to work on this, except of time we all lack xD

@github-actions github-actions bot removed the Stale label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@valoricDe @joel492 and others