fixes for ie8

3col
Vitaliy Filippov 2015-01-16 17:30:53 +03:00
parent ef7d5e2899
commit a48addb67c
3 changed files with 5 additions and 4 deletions

View File

@ -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
{

View File

@ -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);

View File

@ -37,7 +37,8 @@
<!--
function onLoadActions() {
quicksearchHelpText('quicksearch_main', 'show');
if( window.external && window.external.AddSearchProvider ){
if( window.external && ( typeof( window.external.AddSearchProvider ) != 'undefined' &&
typeof( window.external.AddSearchProvider ) != 'unknown' ) ){
removeClass('quicksearch_plugin', 'bz_default_hidden');
}
document.getElementById('quicksearch_top').focus();