From 1f2b093ed110b4a98665306edae267a77268ec0f Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 23 Jan 2020 10:14:27 +0300 Subject: [PATCH] [PE mobile] Fix bug 42820 --- .../mobile/app/controller/Settings.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js index 1dd72da7c..57734d577 100644 --- a/apps/presentationeditor/mobile/app/controller/Settings.js +++ b/apps/presentationeditor/mobile/app/controller/Settings.js @@ -316,10 +316,13 @@ define([ // API handlers onApiPageSize: function(width, height) { - for (var i = 0; i < _slideSizeArr.length; i++) { - if (Math.abs(_slideSizeArr[i][0] - width) < 0.001 && Math.abs(_slideSizeArr[i][1] - height) < 0.001) { - $('#page-settings-setup-view input').val([i]); - break; + var $input = $('#page-settings-view input[name="slide-size"]'); + if ($input.length > 0) { + for (var i = 0; i < _slideSizeArr.length; i++) { + if (Math.abs(_slideSizeArr[i][0] - width) < 0.001 && Math.abs(_slideSizeArr[i][1] - height) < 0.001) { + $input.val([i]); + break; + } } } },