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

Commit

Permalink
Add Opera hack to ensure correct positioning of tip. Fixes #367
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Feb 11, 2013
1 parent 60a993a commit e037932
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 10 deletions.
11 changes: 9 additions & 2 deletions dist/jquery.qtip.css
@@ -1,12 +1,12 @@
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1-19-
* qTip2 - Pretty powerful tooltips - v2.0.1-20-
* http://qtip2.com
*
* Copyright (c) 2013 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Mon Feb 11 2013 12:48 GMT+0000
* Date: Mon Feb 11 2013 01:16 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/
Expand Down Expand Up @@ -566,8 +566,15 @@
margin: 0 auto;
overflow: hidden;
z-index: 10;

}

/* Opera bug #357 - Incorrect tip position
https://github.com/Craga89/qTip2/issues/367 */
x:-o-prefocus, .qtip .qtip-tip{
visibility: hidden;
}

.qtip .qtip-tip,
.qtip .qtip-tip .qtip-vml,
.qtip .qtip-tip canvas{
Expand Down
19 changes: 15 additions & 4 deletions dist/jquery.qtip.js
@@ -1,12 +1,12 @@
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1-19-
* qTip2 - Pretty powerful tooltips - v2.0.1-20-
* http://qtip2.com
*
* Copyright (c) 2013 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Mon Feb 11 2013 12:48 GMT+0000
* Date: Mon Feb 11 2013 01:16 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/
Expand Down Expand Up @@ -111,7 +111,8 @@ function sanitizeOptions(opts)
}

if('show' in opts && invalid(opts.show)) {
opts.show = opts.show.jquery ? { target: opts.show } : { event: opts.show };
opts.show = opts.show.jquery ? { target: opts.show } :
opts.show === TRUE ? { ready: TRUE } : { event: opts.show };
}

if('hide' in opts && invalid(opts.hide)) {
Expand Down Expand Up @@ -1770,7 +1771,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '2.0.1-19-';
QTIP.version = '2.0.1-20-';
QTIP.nextid = 0;
QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
QTIP.zindex = 15000;
Expand Down Expand Up @@ -2589,8 +2590,18 @@ function Tip(qTip, command)
});
}

// Opera bug #357 - Incorrect tip position
// https://github.com/Craga89/qTip2/issues/367
setTimeout(function() {
elems.tip.css({
display: 'inline-block',
visibility: 'visible'
});
}, 1);

// Position if needed
if(position !== FALSE) { self.position(corner); }

},

// Tip positioning method
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/core.js
Expand Up @@ -35,7 +35,8 @@ function sanitizeOptions(opts)
}

if('show' in opts && invalid(opts.show)) {
opts.show = opts.show.jquery ? { target: opts.show } : { event: opts.show };
opts.show = opts.show.jquery ? { target: opts.show } :
opts.show === TRUE ? { ready: TRUE } : { event: opts.show };
}

if('hide' in opts && invalid(opts.hide)) {
Expand Down
7 changes: 7 additions & 0 deletions src/tips/tips.css
Expand Up @@ -3,8 +3,15 @@
margin: 0 auto;
overflow: hidden;
z-index: 10;

}

/* Opera bug #357 - Incorrect tip position
https://github.com/Craga89/qTip2/issues/367 */
x:-o-prefocus, .qtip .qtip-tip{
visibility: hidden;
}

.qtip .qtip-tip,
.qtip .qtip-tip .qtip-vml,
.qtip .qtip-tip canvas{
Expand Down
10 changes: 10 additions & 0 deletions src/tips/tips.js
Expand Up @@ -519,8 +519,18 @@ function Tip(qTip, command)
});
}

// Opera bug #357 - Incorrect tip position
// https://github.com/Craga89/qTip2/issues/367
setTimeout(function() {
elems.tip.css({
display: 'inline-block',
visibility: 'visible'
});
}, 1);

// Position if needed
if(position !== FALSE) { self.position(corner); }

},

// Tip positioning method
Expand Down

0 comments on commit e037932

Please sign in to comment.