diff --git a/services/web/app/views/project/editor/left-menu.pug b/services/web/app/views/project/editor/left-menu.pug index 831dc212ae..fd5b7bdd90 100644 --- a/services/web/app/views/project/editor/left-menu.pug +++ b/services/web/app/views/project/editor/left-menu.pug @@ -136,7 +136,8 @@ aside#left-menu.full-size( label(for="fontSize") #{translate("font_size")} select( name="fontSize" - ng-model="settings.fontSize" + ng-model="fontSizeAsStr" + ng-model-options="{ getterSetter: true }" ) each size in ['10','11','12','13','14','16','20','24'] option(value=size) #{size}px diff --git a/services/web/public/coffee/ide/settings/controllers/SettingsController.coffee b/services/web/public/coffee/ide/settings/controllers/SettingsController.coffee index bde479991b..b42d07467c 100644 --- a/services/web/public/coffee/ide/settings/controllers/SettingsController.coffee +++ b/services/web/public/coffee/ide/settings/controllers/SettingsController.coffee @@ -8,6 +8,11 @@ define [ if $scope.settings.pdfViewer not in ["pdfjs", "native"] $scope.settings.pdfViewer = "pdfjs" + $scope.fontSizeAsStr = (newVal) -> + if newVal? + $scope.settings.fontSize = newVal + return $scope.settings.fontSize.toString() + $scope.$watch "settings.theme", (theme, oldTheme) => if theme != oldTheme settings.saveSettings({theme: theme})