diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js index 3cf677716b..0fb69a3e5e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js @@ -123,11 +123,6 @@ angular.module("umbraco.directives") editor.getBody().setAttribute('spellcheck', true); - //hide toolbar by default - $(editor.editorContainer) - .find(".mce-toolbar") - .css("visibility", "hidden"); - //force overflow to hidden to prevent no needed scroll editor.getBody().style.overflow = "hidden"; @@ -138,32 +133,6 @@ angular.module("umbraco.directives") }, 400); }); - - // pin toolbar to top of screen if we have focus and it scrolls off the screen - var pinToolbar = function () { - - var _toolbar = $(editor.editorContainer).find(".mce-toolbar"); - var toolbarHeight = _toolbar.height(); - - var _tinyMce = $(editor.editorContainer); - var tinyMceRect = _tinyMce[0].getBoundingClientRect(); - var tinyMceTop = tinyMceRect.top; - var tinyMceBottom = tinyMceRect.bottom; - - if (tinyMceTop < 100 && (tinyMceBottom > (100 + toolbarHeight))) { - _toolbar - .css("visibility", "visible") - .css("position", "fixed") - .css("top", "100px") - .css("margin-top", "0"); - } else { - _toolbar - .css("visibility", "visible") - .css("position", "absolute") - .css("top", "auto") - .css("margin-top", (-toolbarHeight - 2) + "px"); - } - }; //when we leave the editor (maybe) editor.on('blur', function (e) { @@ -178,8 +147,6 @@ angular.module("umbraco.directives") scope.onBlur(); } - _toolbar.css("visibility", "hidden"); - $('.umb-panel-body').off('scroll', pinToolbar); }); }); @@ -191,8 +158,6 @@ angular.module("umbraco.directives") scope.onFocus(); } - pinToolbar(); - $('.umb-panel-body').on('scroll', pinToolbar); }); }); @@ -204,8 +169,6 @@ angular.module("umbraco.directives") scope.onClick(); } - pinToolbar(); - $('.umb-panel-body').on('scroll', pinToolbar); }); }); diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less index a02be9765f..5d8dea7549 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less @@ -2,10 +2,6 @@ // Gridview // ------------------------- -.mceContentBody { - overflow-y: hidden!important; -} - .umb-grid IFRAME { overflow: hidden; } @@ -591,7 +587,9 @@ // TINYMCE EDITOR // ------------------------- + .umb-grid .mce-panel { + background: transparent !important; border: none !important; clear: both; } @@ -602,35 +600,23 @@ } .umb-grid .mce-toolbar { - border: 1px solid rgba(207, 207, 207, 0.7); + border-bottom: 1px solid rgba(207, 207, 207, 0.7); background-color: rgba(250, 250, 250, 1); - z-index: 100; - display: inline-block; - float: left; - padding: -1px; - position: absolute; - margin: -1px -1px 0; - box-shadow: 2px 2px 10px 0 rgba(50, 50, 50, 0.14); - z-index: 9999999; + display: none; } -.mce-flow-layout-item { +.umb-grid .umb-control.-active .mce-toolbar { + display: block; +} + +.umb-grid .mce-flow-layout-item { margin: 0; } -.umb-grid .mce-panel { - background: transparent !important; +.umb-grid .mceContentBody { + overflow-y: hidden!important; } -.umb-grid .mce-floatpanel { - background-color: #F7F7F7 !important; -} - -.umb-cell-rte { - border: 1px solid @grayLighter; -} - - // MEDIA EDITOR // -------------------------