From 0174f67fe748febf2899286d57669547191a6d9d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 26 Jul 2018 18:17:45 +0100 Subject: [PATCH] fix Devtools input autofocus && state traversal when len === 1 && key="" Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/DevtoolsDialog.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 3078944b62..ea198461c5 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -61,7 +61,7 @@ class GenericEditor extends DevtoolsComponent {
- +
; } @@ -303,10 +303,13 @@ class FilteredList extends React.Component { const TruncatedList = sdk.getComponent("elements.TruncatedList"); return
+ className="mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query" + // force re-render so that autoFocus is applied when this component is re-used + key={this.props.children[0] ? this.props.children[0].key : ''} /> 1) { - onClickFn = this.browseEventType(evType); - } else if (stateKeys.length === 1) { + if (stateKeys.length === 1 && stateKeys[0] === '') { onClickFn = this.onViewSourceClick(stateGroup[stateKeys[0]]); + } else { + onClickFn = this.browseEventType(evType); } return