Project

General

Profile

Actions

Defect #42084

closed

Placeholder icon for non-existent thumbnail flickers rapidly on hover

Added by Mizuki ISHIKAWA about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Attachments
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When hovering the mouse cursor over a thumbnail image, the thumbnail image repeatedly appears and disappears.

Affected Browsers:
Chrome, Edge

Cause:
In Chrome and Edge, if the image in an `img` tag is not displayed, the browser uses the `title` attribute to show a description of the file. When the mouse hovers over the icon, the tooltip feature clears the `title` attribute, causing the file description to appear and disappear repeatedly.


Files

before-thumbnail.gif (509 KB) before-thumbnail.gif Mizuki ISHIKAWA, 2025-01-09 09:35
quick-workaround.diff (1.16 KB) quick-workaround.diff Mizuki ISHIKAWA, 2025-01-09 09:58
Move-tooltip-from-image-to-thumbnail-element.patch (3.8 KB) Move-tooltip-from-image-to-thumbnail-element.patch Katsuya HIDAKA, 2025-01-13 16:58
result2-for-move-tooltip-patch.png (83.2 KB) result2-for-move-tooltip-patch.png Katsuya HIDAKA, 2025-01-13 16:58
result1-for-move-tooltip-patch.png (75.8 KB) result1-for-move-tooltip-patch.png Katsuya HIDAKA, 2025-01-13 16:58

Related issues

Related to Redmine - Feature #41272: Improve tooltip positioning for thumbnailsClosedGo MAEDA

Actions
Related to Redmine - Feature #42133: Refactor thumbnail markup for improved structure and semanticsClosedGo MAEDA

Actions
Actions #1

Updated by Mizuki ISHIKAWA about 1 month ago

Adding the alt attribute solves this problem. However, it seems that putting the filename in the alt attribute of the image is not recommended from an accessibility standpoint. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#accessibility

If you have a better idea, please let me know.

Actions #2

Updated by Katsuya HIDAKA about 1 month ago

I have attached a different approach as a patch.

This patch adds a tooltip (title attribute) to the thumbnail element (which contains both the image and the button). Additionally, this patch adds an alt attribute to the image, as the documentation states that the alt attribute is required for the img tag.

As a result of applying this patch:

What do you think?

Actions #3

Updated by Go MAEDA about 1 month ago

  • Status changed from New to Confirmed
  • Target version set to 6.0.3

Setting the target version to 6.0.3.

Actions #4

Updated by Go MAEDA about 1 month ago

  • Target version changed from 6.0.3 to 6.1.0

Yesterday, I set the target version of this patch to 6.0.3, but after reviewing the content again, I decided to change the target version to 6.1.0.

This patch modifies the DOM structure of the thumbnail display area, which could potentially affect custom themes and plugins. Therefore, I believe it is not suitable to include this in a maintenance release like 6.0.3.

Actions #5

Updated by Go MAEDA about 1 month ago

  • Target version changed from 6.1.0 to 6.0.3

I suggest committing quick-workaround.diff from #note-1, which avoids DOM changes, to version to the 6.0-stable branch for version 6.0.3, and Move-tooltip-from-image-to-thumbnail-element.patch from #note-2, which follows web standards but changes the DOM, to the trunk for version 6.1.0.

Actions #6

Updated by Go MAEDA about 1 month ago

  • Subject changed from Display breaks when hovering over an img tag with a non-existent thumbnail image to Placeholder icon for non-existent thumbnail flickers rapidly on hover
Actions #7

Updated by Go MAEDA about 1 month ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

I have committed quick-workaround.diff in r23452. Thank you for your contribution.

Actions #8

Updated by Go MAEDA about 1 month ago

  • Related to Feature #41272: Improve tooltip positioning for thumbnails added
Actions #9

Updated by Go MAEDA about 1 month ago

I have just opened #42133 to handle Katsuya HIDAKA's Move-tooltip-from-image-to-thumbnail-element.patch.

Actions #10

Updated by Go MAEDA about 1 month ago

  • Related to Feature #42133: Refactor thumbnail markup for improved structure and semantics added
Actions #11

Updated by Go MAEDA about 1 month ago

  • Status changed from Resolved to Closed

Merged the fix into the 6.0-stable branch in r23459.

The another patch Move-tooltip-from-image-to-thumbnail-element.patch will be handled in #42133.

Actions

Also available in: Atom PDF