Fix unnecessary right marging being applied to review panel when rich text is open

This commit is contained in:
Alasdair Smith 2018-07-11 14:08:43 +01:00
parent 538aba323a
commit b4dd047371
2 changed files with 2 additions and 1 deletions

View file

@ -521,6 +521,7 @@ define [
detachFromAce(scope.sharejsDoc)
session = editor.getSession()
session?.destroy()
scope.eventsBridge.emit "aceScrollbarVisibilityChanged", false, 0
scope.$emit "#{scope.name}:inited", editor

View file

@ -164,7 +164,7 @@ define [
updateScrollbar()
updateScrollbar = () ->
if scrollbar.isVisible and $scope.reviewPanel.subView == $scope.SubViews.CUR_FILE
if scrollbar.isVisible and $scope.reviewPanel.subView == $scope.SubViews.CUR_FILE and !$scope.editor.showRichText
$reviewPanelEl.css "right", "#{ scrollbar.scrollbarWidth }px"
else
$reviewPanelEl.css "right", "0"