mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1086981 - Part 5: Cancel editing mode when pressing the tabs panel button. r=lucasr
This commit is contained in:
parent
4ab6e0e431
commit
961a0cabf4
@ -1729,6 +1729,10 @@ public class BrowserApp extends GeckoApp
|
|||||||
if (!areTabsShown()) {
|
if (!areTabsShown()) {
|
||||||
mTabsPanel.setVisibility(View.INVISIBLE);
|
mTabsPanel.setVisibility(View.INVISIBLE);
|
||||||
mTabsPanel.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
mTabsPanel.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
||||||
|
} else {
|
||||||
|
// Cancel editing mode to return to page content when the TabsPanel closes. We cancel
|
||||||
|
// it here because there are graphical glitches if it's canceled while it's visible.
|
||||||
|
mBrowserToolbar.cancelEdit();
|
||||||
}
|
}
|
||||||
|
|
||||||
mTabsPanel.finishTabsAnimation();
|
mTabsPanel.finishTabsAnimation();
|
||||||
|
@ -315,6 +315,10 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
|||||||
tabsButton.setOnClickListener(new Button.OnClickListener() {
|
tabsButton.setOnClickListener(new Button.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
// Clear focus so a back press with the tabs
|
||||||
|
// panel open does not go to the editing field.
|
||||||
|
urlEditLayout.clearFocus();
|
||||||
|
|
||||||
toggleTabs();
|
toggleTabs();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user