From 14c43b85cb872990737887c61895bdd528c76ee7 Mon Sep 17 00:00:00 2001 From: IndrekV Date: Wed, 22 Aug 2018 15:52:35 +0300 Subject: [PATCH] Don't make any changes on focus out event in autocomplete inputs (mac) --- src/ui/osx/TogglDesktop/TimeEntryEditViewController.m | 8 -------- src/ui/osx/TogglDesktop/TimerEditViewController.m | 11 +---------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m b/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m index 8e78bc3d45..4f1fd12adc 100644 --- a/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m +++ b/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m @@ -865,10 +865,6 @@ - (IBAction)descriptionAutoCompleteChanged:(id)sender } NSAssert(self.timeEntry != nil, @"Time entry expected"); - - NSString *key = [self.descriptionAutoCompleteInput stringValue]; - AutocompleteItem *autocomplete = [self.liteDescriptionAutocompleteDataSource get:key]; - [self updateWithSelectedDescription:autocomplete withKey:key]; } - (void)updateWithSelectedDescription:(AutocompleteItem *)autocomplete withKey:(NSString *)key @@ -952,10 +948,6 @@ - (IBAction)projectAutoCompleteChanged:(id)sender } NSAssert(self.timeEntry != nil, @"Expected time entry"); - - NSString *key = self.projectAutoCompleteInput.stringValue; - AutocompleteItem *autocomplete = [self.liteProjectAutocompleteDataSource get:key]; - [self updateWithSelectedProject:autocomplete withKey:key]; } - (void)updateWithSelectedProject:(AutocompleteItem *)autocomplete withKey:(NSString *)key diff --git a/src/ui/osx/TogglDesktop/TimerEditViewController.m b/src/ui/osx/TogglDesktop/TimerEditViewController.m index c143989f6e..502e0db688 100644 --- a/src/ui/osx/TogglDesktop/TimerEditViewController.m +++ b/src/ui/osx/TogglDesktop/TimerEditViewController.m @@ -500,17 +500,8 @@ - (IBAction)autoCompleteChanged:(id)sender { return; } - NSString *key = [self.autoCompleteInput stringValue]; - AutocompleteItem *item = [self.liteAutocompleteDataSource get:key]; - // User has entered free text - if (item == nil || item.Type < 0) - { - self.time_entry.Description = [self.autoCompleteInput stringValue]; - return; - } - - [self fillEntryFromAutoComplete:item]; + self.time_entry.Description = [self.autoCompleteInput stringValue]; } - (void)fillEntryFromAutoComplete:(AutocompleteItem *)item