Arthur Bogaart pushed to branch feature/cmng-psp1 at cms-community / hippo-addon-channel-manager
Commits: c162d191 by Joeri de Gooijer at 2016-04-04T16:05:08+02:00 CHANNELMGR-548 Do not pass Thottle directly as MutationObserver callback Firefox does not seem to respond correcty when the Throttle function is passed directly as callback. Calling it inside an anonymous callback instead seems to fix the problem. - - - - - 8d4d6a51 by Arthur Bogaart at 2016-04-05T12:00:10+02:00 CHANNELMGR-548 Revert muting the throttle function and fix infinite loop on FF When a style attribute is updated with the same value as it already has, it will trigger a MutationObserver callback on Firefox, but not on Chrome/Safari. I have not checked IE yet. See this plunker: https://plnkr.co/a5xyuatiojQqDrrhQyAH So, to fix the infinite loop, we make sure we only change the style attribute if the value is different from what we want it to be. - - - - - 45f2684c by Arthur Bogaart at 2016-04-05T12:08:02+02:00 CHANNELMGR-548 Merge branch feature/cmng-psp1 into feature/cmng-psp1-CHANNELMGR-548 - - - - - 114cd757 by Arthur Bogaart at 2016-04-11T13:13:32+02:00 CHANNELMGR-548 Merge feature/cmng-psp1 changes in feature/cmng-psp1-CHANNELMGR-548 - - - - - d88aaaf9 by Arthur Bogaart at 2016-04-11T13:14:47+02:00 CHANNELMGR-548 Change wording on comment - - - - - 26b174f7 by Arthur Bogaart at 2016-04-11T13:18:09+02:00 CHANNELMGR-548 Reintegrate feature/cmng-psp1-CHANNELMGR-548 - - - - - 1 changed file: - frontend-ng/src/angularjs/channel/hippoIframe/overlay/overlaySync.service.js Changes: ===================================== frontend-ng/src/angularjs/channel/hippoIframe/overlay/overlaySync.service.js ===================================== --- a/frontend-ng/src/angularjs/channel/hippoIframe/overlay/overlaySync.service.js +++ b/frontend-ng/src/angularjs/channel/hippoIframe/overlay/overlaySync.service.js @@ -80,9 +80,13 @@ export class OverlaySyncService { // Reset the height, as the document height will always be at least the iframe height this.iframeJQueryElement.height(''); - // Avoid scroll bars inside the iframe, we want to scroll the "scroll", - // moving the iframe and the overlay in sync. - $(doc.documentElement).css('overflow', 'hidden'); + // Avoid scrollbars from the site as they are controlled by the application. + // Changing a style attribute on Firefox will always invoke a MutationObserver callback, even if the value has + // not changed. To prevent ending up in a loop, only set it when the value is not already 'hidden'. + const docEl = $(doc.documentElement); + if (docEl.css('overflow') !== 'hidden') { + docEl.css('overflow', 'hidden'); + } const height = doc.body.clientHeight; this.iframeJQueryElement.height(height); View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/8e2cfaa4de51f0244d2d9ca0a2badda892399f70...26b174f70ffed6a82af5808188fcdc6ad326821e
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn