From 87cb0307cfce4f5b9a60ebe2d6116fd7e1d35e38 Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Wed, 18 Jun 2025 21:28:26 +0400 Subject: [PATCH] [ios] fix EditorVC NoteCell jumping while typing Signed-off-by: Kiryl Kaveryn --- iphone/Maps/UI/Editor/MWMEditorViewController.mm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/iphone/Maps/UI/Editor/MWMEditorViewController.mm b/iphone/Maps/UI/Editor/MWMEditorViewController.mm index e769e7c5f..191e6c7bd 100644 --- a/iphone/Maps/UI/Editor/MWMEditorViewController.mm +++ b/iphone/Maps/UI/Editor/MWMEditorViewController.mm @@ -901,13 +901,12 @@ void registerCellsForTableView(std::vector const & cells, UITab { self.offscreenCells[(id)cellClass(MWMEditorCellTypeNote)] = cell; self.note = text; - [UIView setAnimationsEnabled:NO]; - [self.tableView refresh]; - [UIView setAnimationsEnabled:YES]; - NSIndexPath * ip = [self.tableView indexPathForCell:cell]; - [self.tableView scrollToRowAtIndexPath:ip - atScrollPosition:UITableViewScrollPositionBottom - animated:YES]; + dispatch_async(dispatch_get_main_queue(), ^{ + [UIView setAnimationsEnabled:NO]; + [self.tableView refresh]; + [self.tableView layoutIfNeeded]; + [UIView setAnimationsEnabled:YES]; + }); } - (void)cell:(MWMNoteCell *)cell didFinishEditingWithText:(NSString *)text { self.note = text; }