diff --git a/js/hinter.js b/js/hinter.js index 836a9a669..f35587f06 100644 --- a/js/hinter.js +++ b/js/hinter.js @@ -130,7 +130,7 @@ SimpleAutocomplete.prototype.init = function() t.style.display = 'none'; t.style.position = 'absolute'; t.style.zIndex = 1000; - document.body.appendChild(t); + document.body.insertBefore(t, document.body.childNodes[0]); } else { diff --git a/js/util.js b/js/util.js index ab2c9e7a2..d7358ddff 100644 --- a/js/util.js +++ b/js/util.js @@ -289,7 +289,7 @@ window.eventTarget = function(ev) */ window.addClass = function(obj, c) { - if (typeof(obj) == 'object' && (obj instanceof Array)) + if (obj !== null && (obj instanceof Array)) // ie8 needs explicit check for null here O_o { for (var i = 0; i < obj.length; i++) addClass(obj[i], c); @@ -302,7 +302,7 @@ window.addClass = function(obj, c) }; window.removeClass = function(obj, c) { - if (typeof(obj) == 'object' && (obj instanceof Array)) + if (obj !== null && (obj instanceof Array)) { for (var i = 0; i < obj.length; i++) removeClass(obj[i], c); diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl index acee8197b..03d3bf580 100644 --- a/template/en/default/index.html.tmpl +++ b/template/en/default/index.html.tmpl @@ -37,7 +37,8 @@