Last modified: 2014-02-05 23:10:40 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 T59144, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57144 - Tipsy: using user class borks positioning of tip
Tipsy: using user class borks positioning of tip
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: matanya
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-16 19:41 UTC by kipod
Modified: 2014-02-05 23:10 UTC (History)
4 users (show)

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


Attachments
patch to file jquery.tipsy.js (1.23 KB, application/octet-stream)
2013-11-16 19:41 UTC, kipod
Details

Description kipod 2013-11-16 19:41:34 UTC
Created attachment 13815 [details]
patch to file jquery.tipsy.js

Tipsy allows adding a user class for specific tips. 

one of the uses of this feature is to change the dimensions of the tip: e.g., when you want to display more in the tip, sometimes the default max-width (25em on mw deployments) may not be enough, and you want to use, say, 35em.

so you can open the tip with "className: wideTip" in teh options, and then add to your css something like

.tipsy.wideTip, .tipsy.wideTip tipsy-inner { max-width: 35em; }

this scheme works, but the problem is that tipsy adds the user class *after* it calculates the tip's dimensions (so the dimensions are calculated with the default class), so when you go through these motions, the tip ends up in the wrong place: it's upper left corner will be in the right place for the tall-and-thin default tip, but the tip itself becomes shorter-and-wider (if the gravity is "south", this will cause the tip to float too high above the element, basically missing the whole point of widening the tip to make it shorter)

the fix is very simple: add the user class immediately after resetting the tip class in function show(), instead of after the location calculation.

patch attached.

peace.
Comment 1 Gerrit Notification Bot 2013-11-16 21:35:55 UTC
Change 95822 had a related patch set uploaded by Matanya:
(bug 57144) Tipsy: using user class borks positioning of tip

https://gerrit.wikimedia.org/r/95822
Comment 2 Gerrit Notification Bot 2013-11-17 09:44:13 UTC
Change 95822 had a related patch set uploaded by Hashar:
(bug 57144) Tipsy: using user class borks positioning of tip

https://gerrit.wikimedia.org/r/95822
Comment 3 kipod 2013-11-22 15:56:37 UTC
any news? we are somewhat stuck here - this patch is waiting for some reviews for a while.

peace.
Comment 4 Gerrit Notification Bot 2014-02-05 22:47:15 UTC
Change 95822 merged by Trevor Parscal:
tipsy: using user class borks positioning of tip

https://gerrit.wikimedia.org/r/95822
Comment 5 matanya 2014-02-05 23:10:40 UTC
This merge seems to resolve the issue. Thanks.

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


Navigation
Links