Last modified: 2014-04-27 22:53:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64985, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62985 - Hovercards: thumbnails do not display in Safari
Hovercards: thumbnails do not display in Safari
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Popups (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Prateek Saxena
:
: 63153 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-23 18:24 UTC by Derk-Jan Hartman
Modified: 2014-04-27 22:53 UTC (History)
4 users (show)

See Also:
Web browser: Apple Safari
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
testcase (35.45 KB, image/png)
2014-03-24 02:37 UTC, Prateek Saxena
Details

Description Derk-Jan Hartman 2014-03-23 18:24:21 UTC
The images for the thumbs do not work for me in Safari. The reason is the following:

TypeError: 'undefined' is not an object (evaluating '$box.removeClass( 'mwe-popups-no-image-tri' ).find( 'image' )[0].setAttribute')

The reason is that no <image> was added but a <img> instead. This is because some browsers (IE and safari) basically have a symbolic link from image to img in the HTML context.

And that leads us to the 2nd problem, these elements are created using jQuery, but jQuery doesn't support element namespaces explicitly and because the image element will be created in the 'current' document context, it will thus create an HTML img element. What you need instead is something like:

document.createElementNS('http://www.w3.org/2000/svg', 'image');
Comment 1 Prateek Saxena 2014-03-24 02:37:35 UTC
Created attachment 14887 [details]
testcase
Comment 2 Derk-Jan Hartman 2014-03-24 08:24:06 UTC
See also: http://stackoverflow.com/questions/11928566/img-vs-image-tag-in-html
Comment 3 Prateek Saxena 2014-03-27 00:53:11 UTC
*** Bug 63153 has been marked as a duplicate of this bug. ***
Comment 4 Gerrit Notification Bot 2014-03-31 11:27:22 UTC
Change 122352 had a related patch set uploaded by Prtksxna:
Use document.createElementNS for svg image

https://gerrit.wikimedia.org/r/122352
Comment 5 Gerrit Notification Bot 2014-04-14 07:48:52 UTC
Change 122352 merged by jenkins-bot:
Use document.createElementNS for svg:image

https://gerrit.wikimedia.org/r/122352
Comment 6 Prateek Saxena 2014-04-14 08:35:41 UTC
Can we close this?
Comment 7 Derk-Jan Hartman 2014-04-14 09:01:40 UTC
Confirmed fixed on beta labs.
Comment 8 Sjoerd de Bruin 2014-04-27 22:53:26 UTC
Thanks for fixing, it's fixed here.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links