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

Commit

Permalink
Fixed positioning regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Dec 30, 2010
1 parent 9e06463 commit 45fd2bb
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 45 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Dec 30 18:27:43 2010 +0000
* Date: Thu Dec 30 18:29:08 2010 +0000
*/

.ui-tooltip-accessible{
Expand Down
12 changes: 7 additions & 5 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Dec 30 18:27:43 2010 +0000
* Date: Thu Dec 30 18:29:08 2010 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -969,7 +969,7 @@ function QTip(target, options, id)
targetHeight = 0,
callback = $.Event('tooltipmove'),
fixed = tooltip.css('position') === 'fixed',
viewport = posOptions.viewport.jquery ? posOptions.viewport : FALSE,
viewport = posOptions.viewport.jquery ? posOptions.viewport : $(window),
position = { left: 0, top: 0 },
readjust = {
left: function(posLeft) {
Expand Down Expand Up @@ -1086,7 +1086,7 @@ function QTip(target, options, id)
position.top += adjust.y + (my.y === 'bottom' ? -elemHeight : my.y === 'center' ? -elemHeight / 2 : 0);

// Calculate collision offset values
if(viewport && target[0] !== window && target[0] !== document.body) {
if(posOptions.viewport.jquery && target[0] !== window && target[0] !== document.body) {
position.adjusted = { left: readjust.left(position.left), top: readjust.top(position.top) };
}
else {
Expand Down Expand Up @@ -1694,8 +1694,10 @@ function Tip(qTip, command)
qTip.reposition();
},
'^style.(classes|widget)$': function() {
self.detectColours();
self.update();
if(elems.tip) {
self.detectColours();
self.update();
}
}
};

Expand Down

0 comments on commit 45fd2bb

Please sign in to comment.