Skip to content

Commit

Permalink
fix(documents): fix inital selection with ctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelinz committed Mar 11, 2024
1 parent 1ccbb1e commit 798df5d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addon/components/document-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ export default class DocumentViewComponent extends Component {
}

@action handleDocumentSelection(selectedDocument, event) {
// SIMPLE CLICK WITH NO MODIFIER KEYS
const isNoDocSelected = this.documents.selectedDocuments.length === 0;
if ((!event.ctrlKey && !event.shiftKey) || isNoDocSelected) {
// SIMPLE CLICK WITH NO MODIFIER KEYS
if (
(!event.ctrlKey && !event.shiftKey) ||
(event.shiftKey && isNoDocSelected)
) {
this.documents.clearDocumentSelection();
this.documents.selectDocument(selectedDocument);
}
Expand Down

0 comments on commit 798df5d

Please sign in to comment.