mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-13 23:17:57 +00:00
Bug 871652 - Disable toolbar's context menu while in editing mode (r=sriram)
This commit is contained in:
parent
f1837f5ba0
commit
40e71deca6
@ -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