Skip to content

Commit

Permalink
Fixed josdejong#828: do not expand/collapse when clicking the text of…
Browse files Browse the repository at this point in the history
… a node in modes `view` or `form`
  • Loading branch information
josdejong committed Oct 26, 2019
1 parent da23553 commit 8e15be0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
https://github.com/josdejong/jsoneditor


## not yet published, version 7.2.1

- Fixed #828: do not expand/collapse when clicking the text of a node in modes
`view` or `form`.


## 2019-10-23, version 7.2.0

- Implemented Japanese translation (`ja`). Thanks @yutakiyama.
Expand Down
3 changes: 1 addition & 2 deletions src/js/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2426,8 +2426,7 @@ export class Node {

// expand events
if (type === 'click') {
if (target === dom.expand ||
((node.editor.options.mode === 'view' || node.editor.options.mode === 'form') && target.nodeName === 'DIV')) {
if (target === dom.expand) {
if (expandable) {
const recurse = event.ctrlKey // with ctrl-key, expand/collapse all
this._onExpand(recurse)
Expand Down
4 changes: 0 additions & 4 deletions src/scss/jsoneditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@ div.jsoneditor-value.jsoneditor-object,
div.jsoneditor-value.jsoneditor-array {
min-width: 16px;
}
div.jsoneditor-mode-view tr.jsoneditor-expandable td.jsoneditor-tree,
div.jsoneditor-mode-form tr.jsoneditor-expandable td.jsoneditor-tree {
cursor: pointer;
}
div.jsoneditor-tree button.jsoneditor-contextmenu:hover,
div.jsoneditor-tree button.jsoneditor-contextmenu:focus,
div.jsoneditor-tree button.jsoneditor-contextmenu.jsoneditor-selected,
Expand Down

0 comments on commit 8e15be0

Please sign in to comment.