From 4032f95ceb2c456f54de9802c64d814e1b835e54 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Wed, 9 Jul 2014 10:53:56 +0400 Subject: [PATCH] Fixed 'bodyScroll: false' --- src/Ply.es6 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Ply.es6 b/src/Ply.es6 index 8aee41e..889fa66 100644 --- a/src/Ply.es6 +++ b/src/Ply.es6 @@ -839,7 +839,10 @@ _activate: function () { if (!this.hasFlag('bodyScroll')) { var bodyEl = this.bodyEl, - dummyEl = _buildDOM() + dummyEl = _buildDOM({ + css: { overflow: 'scroll', visibility: 'hidden' }, + children: [{ tag: 'div' }] + }) ; // @todo: Покрыть тестами @@ -850,7 +853,7 @@ _appendChild(bodyEl, dummyEl); _css(bodyEl, { overflow: 'hidden', - paddingRight: bodyEl.offsetWidth - dummyEl.offsetWidth + 'px' + paddingRight: (dummyEl.offsetWidth - dummyEl.firstChild.offsetWidth) + 'px' }); _removeElement(dummyEl); }