Last modified: 2014-10-21 08:01:10 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 T74267, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72267 - Tipsy popup mispositioned on page load
Tipsy popup mispositioned on page load
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: tipsy
  Show dependency treegraph
 
Reported: 2014-10-20 17:17 UTC by Tisza Gergő
Modified: 2014-10-21 08:01 UTC (History)
3 users (show)

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


Attachments

Description Tisza Gergő 2014-10-20 17:17:49 UTC
When displaying a popup immediately after the page is loaded, if the anchor element is itself created by Javascript code, the popup can end up at the wrong position. Possibly the tipsy positioning code runs before the page is repainted and the anchor is updated to its correct position.

Steps to reproduce:
* install MediaViewer changeset https://gerrit.wikimedia.org/r/#/c/164530/
* comment out lines 316 and 318 in resources/mmv/mmv.bootstrap.js (which is a workaround for this bug)
* open a file page, scroll down to the bottom of the image
* run >> mw.mmv.bootstrap.config.setInLocalStorage( 'mmv-showStatusInfo', '1' ); << in the browser console
* reload the page

Expected result: a popup appears, and the tip is positioned a few pixels above the "open in Media Viewer" button

Actual results: the tip is positioned well below the button. After closing and reopening ( >> mw.mmv.bootstrap.statusInfoDialog.close() << / >> mw.mmv.bootstrap.statusInfoDialog.open() << ) it is positioned correctly.

(The tipsy element in the example has been significantly restyled but removing all styling does not change anything.)

Workaround: set a timeout so that the tooltip appears later. In my attempts, 1000ms worked but 500 did not. I tried more intelligent approaches (making sure the tooltip does not appear before the domready event, delaying it until .is(':visible') for the button returns true) but they did not work.

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


Navigation
Links