зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1017276 - Do not close editing mode during animation. r=lucasr
This commit is contained in:
Родитель
507dfa727f
Коммит
d6222f0d5c
|
@ -377,10 +377,14 @@ public class BrowserToolbar extends ThemedRelativeLayout
|
|||
editCancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
|
||||
TelemetryContract.Method.ACTIONBAR,
|
||||
getResources().getResourceEntryName(editCancel.getId()));
|
||||
cancelEdit();
|
||||
// If we exit editing mode during the animation,
|
||||
// we're put into an inconsistent state (bug 1017276).
|
||||
if (!isAnimatingEntry) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
|
||||
TelemetryContract.Method.ACTIONBAR,
|
||||
getResources().getResourceEntryName(editCancel.getId()));
|
||||
cancelEdit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -407,7 +411,9 @@ public class BrowserToolbar extends ThemedRelativeLayout
|
|||
}
|
||||
|
||||
public boolean onBackPressed() {
|
||||
if (isEditing()) {
|
||||
// If we exit editing mode during the animation,
|
||||
// we're put into an inconsistent state (bug 1017276).
|
||||
if (isEditing() && !isAnimatingEntry) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
|
||||
TelemetryContract.Method.BACK);
|
||||
cancelEdit();
|
||||
|
|
Загрузка…
Ссылка в новой задаче