diff --git a/Resources/public/js/alloyeditor/buttons/embed.js b/Resources/public/js/alloyeditor/buttons/embed.js index 5e71e3c4..5f71b9c2 100644 --- a/Resources/public/js/alloyeditor/buttons/embed.js +++ b/Resources/public/js/alloyeditor/buttons/embed.js @@ -75,9 +75,15 @@ YUI.add('ez-alloyeditor-button-embed', function (Y) { */ _addEmbed: function (e) { var contentInfo = e.selection.contentInfo, - widget; + widget, + scrollX = window.pageXOffset || document.documentElement.scrollLeft, + scrollY = window.pageYOffset || document.documentElement.scrollTop; this.execCommand(); + + // Workaround for https://jira.ez.no/browse/EZP-28078 + window.scrollTo(scrollX, scrollY); + this._setContentInfo(contentInfo); widget = this._getWidget().setWidgetContent(''); this._fireUpdatedEmbed(e.selection);