SVG <title> Element Not Displaying Tooltip on Hover
Reported by
j...@jenandjon.org,
Sep 4 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 Example URL: https://jsfiddle.net/y7fwgz7z/4/ Steps to reproduce the problem: Create a simple SVG with a <title> element: ``` <svg width="60px" height="60px"> <title>Element Title</title> <rect width="50px" height="50px" fill="red"/> </svg> ``` or visit my fiddle: https://jsfiddle.net/y7fwgz7z/4/ What is the expected behavior? The title should display as a tooltip when the element is hovered over by the mouse. What went wrong? Nothing displays Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: <Co60.0.3112.113py from: 'about:version'> Channel: n/a OS Version: Ubuntu 16.04 (64-bit) Flash Version: Shockwave Flash 26.0 r0 I've tested this in chromium on linux, chrome os, and Chrome Browser for OSX. Bug exists everywhere. Works in Firefox and Safari.
,
Sep 5 2017
We apparently don't display the title on hover for the <svg> element only. If you put the title inside the <rect> it works as expected.
,
Sep 8 2017
@schenney, So should this be marked as Won'tFix then? I see similar comment in the code, https://goo.gl/gGD1dv
,
Sep 9 2017
I think the question/issue is whether we should show a tooltip for inline SVG - in contrast to standalone (<svg> being the document element.)
,
Oct 6 2017
,
Oct 20 2017
fs, By standalone do you also mean SVG imported as an <object>? If that is yes, I have uploaded a preliminary patch which allows displaying of title only for inline SVG, https://chromium-review.googlesource.com/c/chromium/src/+/729779
,
Oct 20 2017
With 'standalone' I mean all cases where the <svg> is the document element (as stated in the parenthesis of my previous comment.)
,
Nov 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3ffa79d39b9cdbd3c6bc00fc4fd33a60bc27b4f5 commit 3ffa79d39b9cdbd3c6bc00fc4fd33a60bc27b4f5 Author: Mrunal Kapade <mrunal.kapade@intel.com> Date: Wed Nov 08 19:42:39 2017 Allow displaying of title when hovered over inline SVG. However this blocks displaying of title when SVG is imported as an object or is the top-level document. BUG= 761827 Change-Id: I813705019a049768762f33f40595afa63ff59b27 Reviewed-on: https://chromium-review.googlesource.com/729779 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Mrunal Kapade <mrunal.kapade@intel.com> Cr-Commit-Position: refs/heads/master@{#514909} [add] https://crrev.com/3ffa79d39b9cdbd3c6bc00fc4fd33a60bc27b4f5/third_party/WebKit/LayoutTests/svg/dom/resources/tooltip-title-external-svg.svg [add] https://crrev.com/3ffa79d39b9cdbd3c6bc00fc4fd33a60bc27b4f5/third_party/WebKit/LayoutTests/svg/dom/tooltip-title-external-svg.html [add] https://crrev.com/3ffa79d39b9cdbd3c6bc00fc4fd33a60bc27b4f5/third_party/WebKit/LayoutTests/svg/dom/tooltip-title-inline-svg.html [modify] https://crrev.com/3ffa79d39b9cdbd3c6bc00fc4fd33a60bc27b4f5/third_party/WebKit/Source/core/svg/SVGElement.cpp
,
Nov 9 2017
,
Nov 9 2017
Thank you so much everyone who was involved in this discussion and the fix. It will make a real different in our work. |
||||
►
Sign in to add a comment |
||||
Comment 1 by keerthan...@techmahindra.com
, Sep 5 2017Components: -Blink Blink>SVG
Labels: Needs-Triage-M60 Triaged-ET M-63 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)