diff --git a/app/assets/javascripts/views/notes/notes-view.pug b/app/assets/javascripts/views/notes/notes-view.pug index fe6f0c143..7433890f7 100644 --- a/app/assets/javascripts/views/notes/notes-view.pug +++ b/app/assets/javascripts/views/notes/notes-view.pug @@ -26,8 +26,8 @@ ng-click='self.clearFilterText();', ng-show='self.state.noteFilter.text' ) ✕ - ng-if='self.state.searchIsFocused || self.state.searchOptionsAreFocused' label.sk-panel-row.justify-left.mt-2( + ng-if='self.state.searchIsFocused || self.state.searchOptionsAreFocused || self.state.authorizingSearchOptions' style="padding-bottom: 0" ) .sk-horizontal-group.tight diff --git a/app/assets/javascripts/views/notes/notes_view.ts b/app/assets/javascripts/views/notes/notes_view.ts index 2fcd72a4c..1f3f88289 100644 --- a/app/assets/javascripts/views/notes/notes_view.ts +++ b/app/assets/javascripts/views/notes/notes_view.ts @@ -37,6 +37,7 @@ type NotesState = { } searchIsFocused: boolean; searchOptionsAreFocused: boolean; + authorizingSearchOptions: boolean; mutable: { showMenu: boolean } completedFullSync: boolean [PrefKey.TagsPanelWidth]?: number @@ -139,7 +140,8 @@ class NotesViewCtrl extends PureViewCtrl { completedFullSync: false, hideTags: true, searchIsFocused: false, - searchOptionsAreFocused: false + searchOptionsAreFocused: false, + authorizingSearchOptions: false }; } @@ -166,9 +168,15 @@ class NotesViewCtrl extends PureViewCtrl { this.state.noteFilter.includeProtectedNoteText = false; } else { event.preventDefault(); + this.setState({ + authorizingSearchOptions: true, + }); if (await this.application.authorizeSearchingProtectedNotesText()) { this.state.noteFilter.includeProtectedNoteText = true; } + this.setState({ + authorizingSearchOptions: false, + }); } this.flushUI(); }