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

Set "show popup" to ctrl for text doesn't disable the popup when hovering over text with a HTML title attribute #946

Closed
Ileca opened this issue Apr 22, 2022 · 5 comments

Comments

@Ileca
Copy link

Ileca commented Apr 22, 2022

I have set "show popup" to ctrl for text, meaning the popup should only be shown when I press this key. However, the popup is not disabled when it comes to hover over text with a HTML title attribute that contains Japanese.
You can use https://vndb.org/ and hover over any line from the Recent Changes box. If the line's title attribute has Japanese in it, the popup will be triggered regardless of my setting and show the popup for the first recognized Japanese word.

@birtles
Copy link
Member

birtles commented Apr 22, 2022

Hi! Thanks for filing this. That's a really good point. I guess we should check what sort of element the title is attached to.

@Ileca
Copy link
Author

Ileca commented Apr 22, 2022

I noticed that if you set ctrl for pictures (after I noticed that the popup was also triggered because of the alt attribute of the img element), this behavior stops. Not sure I understand what's the point of setting this addon for pictures. I assume it's for "text in SVG images"? If that's the case, then, the popup being also triggered by the alt attribute is also an issue?

@birtles
Copy link
Member

birtles commented Apr 22, 2022

I noticed that if you set ctrl for pictures (after I noticed that the popup was also triggered because of the alt attribute of the img element), this behavior stops. Not sure I understand what's the point of setting this addon for pictures. I assume it's for "text in SVG images"? If that's the case, then, the popup being also triggered by the alt attribute is also an issue?

"Images" there effectively refers to the alt or title attribute of any element, but typically those attributes show up most often on images. In this issue I think we should narrow it so that setting only applies to <img>, <picture>, <video> etc. and treat everything else as text.

The reason there are two settings is because a lot of users want the popup to show up automatically (i.e. without pressing the Ctrl key) but find it annoying when it shows up for images with alt/title text (e.g. certain image galleries do that it seems). So, with that setting, they can enable the Ctrl for images only and it will never popup unless they explicitly make it do so.

@Ileca
Copy link
Author

Ileca commented Apr 22, 2022

What I don't understand is how are you supposed to navigate the Japanese in a title tooltip? I mean, it only works for the first word so far. For the alt, I guess it's for when pictures are not loaded, which doesn't happen often, but I can see a use here, at least.

@birtles
Copy link
Member

birtles commented Apr 23, 2022

What I don't understand is how are you supposed to navigate the Japanese in a title tooltip? I mean, it only works for the first word so far. For the alt, I guess it's for when pictures are not loaded, which doesn't happen often, but I can see a use here, at least.

It actually uses a different lookup mode in this case, looking up each of the words in turn.

For example in this screenshot it's showing the results for 国際, 外交, and タイムライン in turn.

image

If you switch tabs, it's only going to operate from the start of the string, but hopefully it's still helpful sometimes.

Here's another example:

image

When there are only word result, it shows a little title at the top:

image

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

2 participants