Merge pull request #455 from ailin-nemui/ifneeded-conditional
embedded content: check if scrollIntoViewIfNeeded vendor method is available
This commit is contained in:
commit
ddbb3a4e21
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ weechat.directive('plugin', ['$rootScope', function($rootScope) {
|
|||
// Scroll embed content into view
|
||||
var scroll = function() {
|
||||
var embed = document.querySelector(".embed_" + $scope.plugin.$$hashKey);
|
||||
if (embed) {
|
||||
if (embed && embed.scrollIntoViewIfNeeded !== undefined) {
|
||||
embed.scrollIntoViewIfNeeded();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue