Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Potential fix for max-width viewport issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Feb 20, 2013
1 parent a546127 commit 2e2bf7f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dist/jquery.qtip.css
@@ -1,12 +1,12 @@
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1-24-
* qTip2 - Pretty powerful tooltips - v2.0.1-25-
* http://qtip2.com
*
* Copyright (c) 2013 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Wed Feb 20 2013 10:47 GMT+0000
* Date: Wed Feb 20 2013 11:04 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/
Expand Down
11 changes: 7 additions & 4 deletions dist/jquery.qtip.js
@@ -1,12 +1,12 @@
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1-24-
* qTip2 - Pretty powerful tooltips - v2.0.1-25-
* http://qtip2.com
*
* Copyright (c) 2013 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Wed Feb 20 2013 10:47 GMT+0000
* Date: Wed Feb 20 2013 11:04 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/
Expand Down Expand Up @@ -984,6 +984,7 @@ function QTip(target, options, id, attr)
otherOpts = options[ !state ? 'show' : 'hide' ],
posOptions = options.position,
contentOptions = options.content,
width = tooltip.css('width'),
visible = tooltip[0].offsetWidth > 0,
animate = state || opts.target.length === 1,
sameTarget = !event || opts.target.length < 2 || cache.target[0] === event.target,
Expand Down Expand Up @@ -1019,8 +1020,10 @@ function QTip(target, options, id, attr)
trackingBound = TRUE;
}

// Update the tooltip position
// Update the tooltip position (set width first to prevent viewport/max-width issues)
if(!width) { tooltip.css('width', tooltip.outerWidth()); }
self.reposition(event, arguments[2]);
if(!width) { tooltip.css('width', ''); }

// Hide other tooltips if tooltip is solo
if(!!opts.solo) {
Expand Down Expand Up @@ -1793,7 +1796,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '2.0.1-24-';
QTIP.version = '2.0.1-25-';
QTIP.nextid = 0;
QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
QTIP.zindex = 15000;
Expand Down

0 comments on commit 2e2bf7f

Please sign in to comment.