Don't use jQuery, simplify
This commit is contained in:
parent
e48fe29cf8
commit
2e963da581
1 changed files with 5 additions and 7 deletions
|
@ -812,13 +812,11 @@ weechat.directive('plugin', function() {
|
||||||
$scope.plugin.visible = true;
|
$scope.plugin.visible = true;
|
||||||
|
|
||||||
// Scroll embed content into view
|
// Scroll embed content into view
|
||||||
var elems = $("." + $scope.plugin.$$hashKey);
|
|
||||||
if (elems.length == 1) {
|
|
||||||
var scroll = function() {
|
var scroll = function() {
|
||||||
elems[0].scrollIntoViewIfNeeded();
|
var embed = document.querySelector("." + $scope.plugin.$$hashKey);
|
||||||
|
embed.scrollIntoViewIfNeeded();
|
||||||
};
|
};
|
||||||
setTimeout(scroll, 100);
|
setTimeout(scroll, 100);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue