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

Are you experiencing a change in font size when a link is clicked? #17

Closed
nkmathew opened this issue Jul 11, 2020 · 6 comments
Closed
Labels

Comments

@nkmathew
Copy link

I'm not sure if it's a Chrome update that caused this because I can't recall it behaving like this earlier this year. I'm on Version 83.0.4103.116 (Official Build) (64-bit)

https://imgur.com/a/3YQqlCH

@AdeelH
Copy link
Owner

AdeelH commented Jul 12, 2020

Yes! It only started happening a few months ago. And of course the extension hasn't been updated during that time.

It's honestly pretty bizarre. It seems to scale the whole popup somehow and if you inspect element, you see that the popup width and font size values have not changed at all! Further, disabling and re-enabling those values seems to bring everything back to normal.

It's not even the only graphic glitch I've been experiencing in Chrome. These days, if you close tabs too quickly, the favicon or loading circle doesn't get cleared:
image

I was hoping that these maybe related and that this issue will just go away on its own when the Chrome devs get around to fixing whatever it is they messed up.

Let me know if you have any ideas.

@nkmathew
Copy link
Author

I've been playing around with it and for some reason it looks like it only scales when the href in the links has a subdomain in it. With this in popup.html if I remove www. it doesn't scale but adding it back causes the size increase. Can you confirm you're getting the same?

<style type="text/css" media="all">
  body {
    font-size: 13px !important;
    width: 500px;
  }
</style>

<span style="">
  <a href="https://www.reddit.com/comments/hxxcrs">
    <span>123 comments</span>
  </a>
  <br>
  <a href="https://www.reddit.com/u/kn0thing/overview">
    <span>Author</span>
  </a>
</span>

@AdeelH
Copy link
Owner

AdeelH commented Jul 12, 2020

Wow, that does work. But it gets weirder ...

  • The glitch happens for www.reddit.com, np.reddit.com, and old.reddit.com, but not for i.redd.it, api.reddit.com, youtube.reddit.com and every other subdomain that I tried
  • www.google.com causes the popup to actually shrink instead of expanding
  • en.wikipedia.org works fine
  • The glitch is not related to any JS code. It occurs even after disabling all event listeners.

I also discovered that editing the href to an invalid URL causes the popup to immediately go to the DNS error page (without any clicking), which means Chrome is doing DNS pre-fetching even though I have pre-loading disabled in the settings.

@nkmathew
Copy link
Author

i.redd.it causes the biggest increase for me. I honestly don't understand what's going on. I was thinking maybe it's the headers sent by Reddit but then how would that end up causing the popup to scale.

https://imgur.com/a2vgLh6

I tried this simple extension in Firefox and no link behaves like in Chrome:

manifest.json:

{
  "manifest_version": 2,
  "name": "Test Extension",
  "description": "Tests popup link scaling bug",
  "version": "0.1.0",
  "browser_action": {
    "default_title": "Scaling bug",
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  },
  "icons": {
    "16": "icon.png",
    "48": "icon.png",
    "128": "icon.png"
  },
  "manifest_version": 2,
  "permissions": [
  ]
}

popup.html:

<style type="text/css" media="all">
  body {
    font-size: 13px !important;
    width: 300px;
  }
</style>

<span style="">
  <a href="https://youtube.reddit.com">
    youtube.reddit.com
  </a>
  <br>
  <a href="https://old.reddit.com">
    old.reddit.com
  </a>
  <br>
  <a href="https://np.reddit.com">
    np.reddit.com
  </a>
  <br>
  <a href="https://i.redd.it">
    i.redd.it
  </a>
  <br>
  <a href="https://api.reddit.com">
    api.reddit.com
  </a>
  <br>
  <a href="https://www.reddit.com">
    www.reddit.com
  </a>
  <br>
  <a href="https://reddit.com">
    reddit.com
  </a>
  <br>
  <a href="https://www.twitter.com">
    www.twitter.com
  </a>
  <br>
  <a href="https://www.google.com">
    www.google.com
  </a>
  <br>
  <a href="https://en.wikipedia.org">
    en.wikipedia.org
  </a>
  <br>
  <a href="https">
    Invalid
  </a>
  <br>
  <a href="#">
    #####
  </a>
</span>

Where is this pre-loading setting you mention?

@AdeelH
Copy link
Owner

AdeelH commented Jul 12, 2020

Where is this pre-loading setting you mention?

It's in the 'cookies and other site data' section. Just search for "preload".

AdeelH added a commit that referenced this issue Aug 2, 2020
@AdeelH
Copy link
Owner

AdeelH commented Sep 20, 2020

Fixed in latest release. Will be updated on webstore after it has passed review.

@AdeelH AdeelH closed this as completed Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants