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] Content script overlay UI appears smaller on some pages #1007

Open
2 of 3 tasks
lucky-bai opened this issue Jun 20, 2024 · 3 comments
Open
2 of 3 tasks

[BUG] Content script overlay UI appears smaller on some pages #1007

lucky-bai opened this issue Jun 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lucky-bai
Copy link

What happened?

I am experiencing a bug with the content script UI that causes it to appear smaller than intended on some pages, notably linkedin.com. Steps to reproduce:

  1. In the examples/with-content-scripts-ui, make the plasmo-overlay.tsx inject into all URLs.
  2. Then navigate to LinkedIn.com (any page).

Expected: On most pages (eg: gmail), it looks like this:

AGAZnRo3FHTEjsurBToo3xXnD5pli_5v3AvLk6uhFQu4idsvEXmD03xI1JGUrL8ruegVjbe2FfK8qkMTGg2YVQhHkkWFaZwQoWGpa7Ew9HSKlJ9pciACvTfYSxHOWMnog1lopTs0NSXTL39Ntf9966-KWcGagXFKrE2uy9LHzVFfM0WbWj75TlCjmcH8Z5dP_FnE8C4_0f9bcewlQ0QWLzBy

However, on LinkedIn, it appears smaller:

AGAZnRq4260xl2ZjlrWUbXm0vM55Qr7XlHcsjLmPOlnqiUGPVrJsanpZRL7uFJ626B92otJ28BE4yBlfM59ZyFvYZ0flWr1uQjT7FpOj1KT2GEkDDnKE7V4s3PPVb7TNjZLTGrhE4uG02-eW0AXnRCT1YsukOyS_jz6Ezuv6TXm_kW2z8ciSNUup-A6xcrrNAjKjN-okciaZOdzicKrNRCuz

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@lucky-bai lucky-bai added the bug Something isn't working label Jun 20, 2024
@fran-veiras
Copy link

did you find any solution? I have the same bug...

@naan
Copy link

naan commented Jul 1, 2024

I had a similar problem where it appears bigger on some pages and it was caused by Root Container Style from the website. The issue is described here: https://docs.plasmo.com/framework/content-scripts-ui/styling#root-container-style

To avoid this, I ended up inserting <iframe> instead of <div> for all of my CSUI, something like the following:

import Frame from "react-frame-component"

export default MyCSUI({content}) {
    ...
    return (
        <Frame>
        <div>
           {content}
        </div>
        </Frame>
    )
}

I don't know what other way to workaround this. The document says override some CSS property with !important but it didn't work if the root container style sets something like font-size.

@gabrielcosi
Copy link

Same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants