Commit 220f2018 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Hide/show accessory view on inactive window.

FormInputAccessoryView is only fully dismissed when keyboard is hidden.
In multiwindow, it is possible that keyboard stays on screen when a text
field edition ends, if the keyboard is used in another window.

Hide the accessory view to avoid having an inactive accessory view on
screen.

Bug: 1125110
Change-Id: I1ff717af263589185e69eaddff8e469edde8c77b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401102Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806110}
parent 27d02bcc
......@@ -83,6 +83,7 @@
- (void)textFieldDidBeginEditing:(UITextField*)textField {
TableViewTextEditCell* cell = [self autofillEditCellForTextField:textField];
_currentEditingCell = cell;
self.formInputAccessoryView.hidden = NO;
[textField setInputAccessoryView:self.formInputAccessoryView];
[self updateAccessoryViewButtonState];
}
......@@ -91,6 +92,7 @@
TableViewTextEditCell* cell = [self autofillEditCellForTextField:textField];
DCHECK(_currentEditingCell == cell);
[textField setInputAccessoryView:nil];
self.formInputAccessoryView.hidden = YES;
_currentEditingCell = nil;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment