Page MenuHomePhabricator

Hovercards don't load image on Windows 10 Project Spartan/Edge browser
Closed, DuplicatePublic

Description

Hovercards on en.wikipedia.org show blank space where images are supposed to appear in the 'Project Spartan' browser (soon to be named 'Microsoft Edge') as of Windows 10 build 10074.

Tried to do a quick debug in developer tools but the cards vanish when I move my mouse, which makes it a bit tricky. :)

Screenshot_2015-05-02_08.47.45.png (1×2 px, 640 KB)

Event Timeline

brion raised the priority of this task from to Needs Triage.
brion updated the task description. (Show Details)
brion added a project: Page-Previews.
brion added a subscriber: brion.

Young but adequate heir for the old IE ;-)

I notice that Chrome is getting an SVG embedded image (wtf?) with explicit width and height set while IE 11 and Spartan/Edge get a div with a style="background-image: url(...)" *and no height set*.

The lack of a height means the div, unlike the svg, gets 0 height and the image is thus invisible.

It's probably because the browser detection module still thinks Edge is MSIE and assumes MSIE will never change or improve... Edge really should be treated distinctly, as they're fixing lots of old compatibility bugs and removing lots of old IE-specific 'features'.

	/**
	 * Checks SVG support on the browser
	 *
	 * Set to false on Internet Explorer because adding SVGs
	 * through JavaScript in IE is failing. Thus, falling back to PNGs
	 *
	 * @property {Boolean} supportsSVG
	 */
	mw.popups.supportsSVG = ( $.client.profile().name === 'msie' ) ?
		false :
		document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' );

Hacking that up I can confirm that using SVG works fine in Edge; adding a version check fixes that for now.

Change 208492 had a related patch set uploaded (by Brion VIBBER):
Use SVG for hovercard images in Windows 10's new Edge/Spartan browser

https://gerrit.wikimedia.org/r/208492

Change 208492 abandoned by Brion VIBBER:
Use SVG for hovercard images in Windows 10's new Edge/Spartan browser

Reason:
Abandoning in favor of Idb425d15

https://gerrit.wikimedia.org/r/208492

Jdlrobson triaged this task as Medium priority.Sep 23 2015, 6:00 PM
Jdlrobson added a subscriber: Jdlrobson.