diff --git a/IPython/frontend/html/notebook/static/js/completer.js b/IPython/frontend/html/notebook/static/js/completer.js
index e54846f..de2ef7d 100644
--- a/IPython/frontend/html/notebook/static/js/completer.js
+++ b/IPython/frontend/html/notebook/static/js/completer.js
@@ -198,8 +198,8 @@ var IPython = (function (IPython) {
// TODO: I propose to remove enough horizontal pixel
// to align the text later
- this.complete.css('left', pos.x + 'px');
- this.complete.css('top', pos.yBot + 'px');
+ this.complete.css('left', pos.left + 'px');
+ this.complete.css('top', pos.bottom + 'px');
this.complete.append(this.sel);
$('body').append(this.complete);
diff --git a/IPython/frontend/html/notebook/static/js/tooltip.js b/IPython/frontend/html/notebook/static/js/tooltip.js
index 8d07cbf..745b317 100644
--- a/IPython/frontend/html/notebook/static/js/tooltip.js
+++ b/IPython/frontend/html/notebook/static/js/tooltip.js
@@ -292,27 +292,21 @@ var IPython = (function (IPython) {
// whatever anchor/head order but arrow at mid x selection
var anchor = this.code_mirror.cursorCoords(false);
var head = this.code_mirror.cursorCoords(true);
- var pos = {};
- pos.y = head.top
- pos.yBot = head.bottom
- pos.x = (head.left+anchor.left)/2;
-
- var xinit = pos.x;
+ var xinit = (head.left+anchor.left)/2;
var xinter = o.left + (xinit - o.left) / w * (w - 450);
var posarrowleft = xinit - xinter;
-
if (this._hidden == false) {
this.tooltip.animate({
'left': xinter - 30 + 'px',
- 'top': (pos.yBot + 10) + 'px'
+ 'top': (head.bottom + 10) + 'px'
});
} else {
this.tooltip.css({
'left': xinter - 30 + 'px'
});
this.tooltip.css({
- 'top': (pos.yBot + 10) + 'px'
+ 'top': (head.bottom + 10) + 'px'
});
}
this.arrow.animate({