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

Long URL names overlap when wrapping #8

Closed
jlarrew opened this issue Apr 8, 2018 · 7 comments
Closed

Long URL names overlap when wrapping #8

jlarrew opened this issue Apr 8, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@jlarrew
Copy link

jlarrew commented Apr 8, 2018

Long URL names that exceed the width of the list item wrap awkwardly and often overlap with other list items. See the image below for an example:

image

@jlarrew
Copy link
Author

jlarrew commented Apr 8, 2018

After some debugging, I discovered that there are potentially two causes for the overlapping text:

  1. The tab doesn't have a favicon, or
  2. The favicon URL is broken or otherwise unreadable.

If the favicon doesn't exist, then the browser will render the 'title' text instead. Since the display property for 'item' is set to inline-block, the tab title is printed on a newline. However, since the vertical size of 'item' is fixed, this extra line overlaps with neighboring items.

For the case of missing favicons, I was able to work around it by simply assigning one:

if (!f) f = chrome.runtime.getURL('images/logo_16.png');

For the case of a broken favicon URL, I simply set the favicon 'title' to something non-printable (instead of the full URL):

favicon.title = ' ';

There may be better solutions to the second case, but this works well enough for me. Here is what the same tab list looks like now:

image

@insaner
Copy link
Contributor

insaner commented Aug 17, 2019

I can confirm the bug (which has been annoying me as well for a while!) and the fix (thank you!).

I will be PR'ing the fix soon. Stay tuned.

insaner added a commit to insaner/ListOpenedTabs that referenced this issue Aug 17, 2019
insaner added a commit to insaner/ListOpenedTabs that referenced this issue Aug 17, 2019
insaner added a commit to insaner/ListOpenedTabs that referenced this issue Aug 24, 2019
@insaner
Copy link
Contributor

insaner commented Aug 24, 2019

I submitted the fix as PR 12
#12

RJHsiao pushed a commit that referenced this issue Aug 24, 2019
Quick fix for issue #8, as provided by @jlarrew.
@RJHsiao RJHsiao added the bug label Aug 24, 2019
@RJHsiao RJHsiao self-assigned this Aug 24, 2019
@RJHsiao
Copy link
Owner

RJHsiao commented Aug 24, 2019

Well done!
I'll release with new version, which will released at the end of August(Maybe).

@RJHsiao RJHsiao added this to the v1.1.0 milestone Aug 24, 2019
@insaner
Copy link
Contributor

insaner commented Aug 29, 2019

Awesome! Thank you! That's great news!

@RJHsiao
Copy link
Owner

RJHsiao commented Aug 31, 2019

@jlarrew & @insaner
New version released, thanks for your help!

@RJHsiao RJHsiao closed this as completed Aug 31, 2019
@insaner
Copy link
Contributor

insaner commented Aug 31, 2019

That's amazing! Glad to have been of some help!

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

3 participants