mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 871652 - Disable toolbar's context menu while in editing mode (r=sriram)
This commit is contained in:
parent
a7c760ae02
commit
7ab7b1dd8b
@ -310,6 +310,11 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {
|
||||
@Override
|
||||
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
|
||||
// We don't the context menu while editing
|
||||
if (isEditing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
MenuInflater inflater = mActivity.getMenuInflater();
|
||||
inflater.inflate(R.menu.titlebar_contextmenu, menu);
|
||||
|
||||
@ -423,7 +428,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
if (text.getSelectionStart() == text.getSelectionEnd())
|
||||
return false;
|
||||
|
||||
// mActivity.getActionBar().show();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -431,15 +435,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
}
|
||||
});
|
||||
|
||||
mUrlEditText.setOnSelectionChangedListener(new CustomEditText.OnSelectionChangedListener() {
|
||||
@Override
|
||||
public void onSelectionChanged(int selStart, int selEnd) {
|
||||
if (Build.VERSION.SDK_INT >= 11 && selStart == selEnd) {
|
||||
// mActivity.getActionBar().hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mTabs.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -771,10 +766,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
InputMethods.isGestureKeyboard(mUrlEditText.getContext())) {
|
||||
updateGoButton(text);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 11) {
|
||||
// mActivity.getActionBar().hide();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user