mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 997996 - Make ToolbarComponent.dismissEditingMode use the cancel editing mode button. r=mcomella
This commit is contained in:
parent
b6f37f1c1c
commit
4411fd40e8
@ -86,6 +86,13 @@ public class ToolbarComponent extends BaseComponent {
|
|||||||
return (ImageButton) getToolbarView().findViewById(R.id.forward);
|
return (ImageButton) getToolbarView().findViewById(R.id.forward);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the View for the edit cancel button in the browser toolbar.
|
||||||
|
*/
|
||||||
|
private ImageButton getEditCancelButton() {
|
||||||
|
return (ImageButton) getToolbarView().findViewById(R.id.edit_cancel);
|
||||||
|
}
|
||||||
|
|
||||||
private CharSequence getTitle() {
|
private CharSequence getTitle() {
|
||||||
return getTitleHelper(true);
|
return getTitleHelper(true);
|
||||||
}
|
}
|
||||||
@ -145,14 +152,19 @@ public class ToolbarComponent extends BaseComponent {
|
|||||||
public ToolbarComponent dismissEditingMode() {
|
public ToolbarComponent dismissEditingMode() {
|
||||||
assertIsEditing();
|
assertIsEditing();
|
||||||
|
|
||||||
if (getUrlEditText().isInputMethodTarget()) {
|
// Cancel Button not implemeneted in tablet.
|
||||||
// Drop the soft keyboard.
|
if (DeviceHelper.isTablet()) {
|
||||||
// TODO: Solo.hideSoftKeyboard() does not clear focus, causing unexpected
|
if (getUrlEditText().isInputMethodTarget()) {
|
||||||
// behavior, but we may want to use it over goBack().
|
// Drop the soft keyboard.
|
||||||
mSolo.goBack();
|
// TODO: Solo.hideSoftKeyboard() does not clear focus, causing unexpected
|
||||||
}
|
// behavior, but we may want to use it over goBack().
|
||||||
|
mSolo.goBack();
|
||||||
|
}
|
||||||
|
|
||||||
mSolo.goBack();
|
mSolo.goBack();
|
||||||
|
} else {
|
||||||
|
mSolo.clickOnView(getEditCancelButton());
|
||||||
|
}
|
||||||
|
|
||||||
waitForNotEditing();
|
waitForNotEditing();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user