GNU bug report logs - #16537
24.3.50; eww displays alt attribute of images on hover - should display title attribute

Previous Next

Package: emacs;

Reported by: asjo <at> koldfront.dk (Adam Sjøgren)

Date: Fri, 24 Jan 2014 18:27:02 UTC

Severity: minor

Tags: fixed

Found in version 24.3.50

Fixed in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: asjo <at> koldfront.dk (Adam Sjøgren)
To: 16537 <at> debbugs.gnu.org
Subject: bug#16537: [PATCH] Use the title attribute for the tooltip, rather than the alt attribute.
Date: Fri, 24 Jan 2014 19:40:09 +0100
---
 lisp/net/shr.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 7ef49ea..2e67b07 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1177,6 +1177,7 @@ The preference is a float determined from `shr-prefer-media-type'."
               (not (eq shr-state 'image)))
       (insert "\n"))
     (let ((alt (cdr (assq :alt cont)))
+          (title (cdr (assq :title cont)))
          (url (shr-expand-url (or url (cdr (assq :src cont))))))
       (let ((start (point-marker)))
        (when (zerop (length alt))
@@ -1228,7 +1229,7 @@ The preference is a float determined from `shr-prefer-media-type'."
          (put-text-property start (point) 'image-url url)
          (put-text-property start (point) 'image-displayer
                             (shr-image-displayer shr-content-function))
-         (put-text-property start (point) 'help-echo alt))
+         (when title (put-text-property start (point) 'help-echo title)))
        (setq shr-state 'image)))))
 
 (defun shr-tag-pre (cont)
-- 
 "That's 'Doctor Destiny, _sir_' to you."                     Adam Sjøgren
                                                         asjo <at> koldfront.dk




This bug report was last modified 11 years and 117 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.