From 5e9fd27c89f6ed5d1c7178c66a24d79ac9330754 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 27 Aug 2014 10:53:57 +0200 Subject: [PATCH] embedded content: check if scrollIntoViewIfNeeded vendor method is available --- js/plugin-directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/plugin-directive.js b/js/plugin-directive.js index 62ea463..f90c70c 100644 --- a/js/plugin-directive.js +++ b/js/plugin-directive.js @@ -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(); } };