Last modified: 2012-08-13 17:47:44 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 T39610, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37610 - Don't use <img> and onmousehover for swapping images
Don't use <img> and onmousehover for swapping images
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
PageCuration (Other open bugs)
unspecified
All All
: Low trivial (vote)
: Future release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 22:45 UTC by Krinkle
Modified: 2012-08-13 17:47 UTC (History)
2 users (show)

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


Attachments

Description Krinkle 2012-06-14 22:45:49 UTC
The <img> with javascript event is:
* is somewhat slow (event handling, DOM manipulation etc.)
* Causes a short flash on first hover of every icon (the image needs to be downloaded first)
* Make the document larger
* Maybe semantics?


Use CSS instead with background-image and the :hover selector. That fixes all of the above:
* Faster (smaller dom, no event binding, no dom manipulation)
* No blink/flash (you can use @embed to have both icons embedded, less bandwidth, fewer http requests and the hover image will be present at all times).

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


Navigation
Links