From e9691ae206c925639fc0c0b963c428d6c87ba660 Mon Sep 17 00:00:00 2001 From: Alexey Leshchenko Date: Fri, 21 May 2021 08:12:49 +0300 Subject: [PATCH] Fixes the iOS extra image bottom padding issue (cherry picked from commit 3206d61ee1ef92c41480c178a29eddeb3de7594f) --- bundles/loconotion.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bundles/loconotion.js b/bundles/loconotion.js index af56fb7..93ce907 100644 --- a/bundles/loconotion.js +++ b/bundles/loconotion.js @@ -86,3 +86,12 @@ for (let i = 0; i < anchorLinks.length; i++) { }); }); } + +// fix the problem with images having an annoying extra padding +// in Webkit renderers on iOS devices + +const imgs = document.getElementsByTagName("img"); + +for (let i = 0; i < imgs.length; i++) { + imgs[i].parentElement.setAttribute("style", "height:auto!important;"); +} \ No newline at end of file