diff --git a/HISTORY.md b/HISTORY.md index be5876a..0b7083b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -13,6 +13,8 @@ integrated in React, Vue, and Angular!_ integrate in frameworks like React. - Implemented options `onChangeJSON(json)` and `onChangeText(jsonString)`. - Added two React examples to the `examples` folder. +- Fixed menu buttons "Sort" and "Transform" being available in modes `view` + and `form`. ## 2018-08-02, version 5.19.2 diff --git a/src/css/menu.css b/src/css/menu.css index ad63840..108a65e 100644 --- a/src/css/menu.css +++ b/src/css/menu.css @@ -59,6 +59,12 @@ div.jsoneditor-menu > button.jsoneditor-sort { div.jsoneditor-menu > button.jsoneditor-transform { background-position: -144px -96px; } +div.jsoneditor.jsoneditor-mode-view > div.jsoneditor-menu > button.jsoneditor-sort, +div.jsoneditor.jsoneditor-mode-form > div.jsoneditor-menu > button.jsoneditor-sort, +div.jsoneditor.jsoneditor-mode-view > div.jsoneditor-menu > button.jsoneditor-transform, +div.jsoneditor.jsoneditor-mode-form > div.jsoneditor-menu > button.jsoneditor-transform { + display: none; +} div.jsoneditor-menu > button.jsoneditor-undo { background-position: -24px -96px; }