diff --git a/browser/devtools/webide/themes/panel-listing.css b/browser/devtools/webide/themes/panel-listing.css
index 84f08edc45c..d3e4e8ce01b 100644
--- a/browser/devtools/webide/themes/panel-listing.css
+++ b/browser/devtools/webide/themes/panel-listing.css
@@ -43,7 +43,7 @@ label,
margin-top: 0;
}
-.panel-header[hidden] {
+.panel-header[hidden], .panel-item[hidden] {
display: none;
}
diff --git a/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css b/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
index 030a8e98be1..37b673a6c93 100644
--- a/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
+++ b/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
@@ -1,6 +1,5 @@
#PopupAutoCompleteRichResult > hbox[anonid="search-suggestions-notification"] {
border-bottom: 1px solid hsla(210, 4%, 10%, 0.14);
- color: -moz-FieldText;
background-color: hsla(210, 4%, 10%, 0.07);
padding: 6px 0;
-moz-padding-start: 44px;
diff --git a/mobile/android/base/AndroidManifest.xml.in b/mobile/android/base/AndroidManifest.xml.in
index e3480df90e0..7fe1d070144 100644
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -140,6 +140,7 @@
+
diff --git a/mobile/android/base/ZoomedView.java b/mobile/android/base/ZoomedView.java
index 10ecf414955..df8c1b0e68e 100644
--- a/mobile/android/base/ZoomedView.java
+++ b/mobile/android/base/ZoomedView.java
@@ -78,6 +78,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
private int containterSize; // shadow, margin, ...
private Point lastPosition;
private boolean shouldSetVisibleOnUpdate;
+ private boolean isBlockedFromAppearing; // Prevent the display of the zoomedview while FormAssistantPopup is visible
private PointF returnValue;
private final PointF animationStart;
private ImageView closeButton;
@@ -228,6 +229,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
public ZoomedView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
isSimplifiedUI = true;
+ isBlockedFromAppearing = false;
getPrefs();
currentZoomFactorIndex = 0;
returnValue = new PointF();
@@ -241,7 +243,8 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
touchListener = new ZoomedViewTouchListener();
EventDispatcher.getInstance().registerGeckoThreadListener(this,
"Gesture:clusteredLinksClicked", "Window:Resize", "Content:LocationChange",
- "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect");
+ "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect",
+ "FormAssist:AutoComplete", "FormAssist:Hide");
}
void destroy() {
@@ -250,7 +253,8 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
ThreadUtils.removeCallbacksFromUiThread(requestRenderRunnable);
EventDispatcher.getInstance().unregisterGeckoThreadListener(this,
"Gesture:clusteredLinksClicked", "Window:Resize", "Content:LocationChange",
- "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect");
+ "Gesture:CloseZoomedView", "Browser:ZoomToPageWidth", "Browser:ZoomToRect",
+ "FormAssist:AutoComplete", "FormAssist:Hide");
}
// This method (onFinishInflate) is called only when the zoomed view class is used inside
@@ -541,6 +545,9 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
}
private void startZoomDisplay(LayerView aLayerView, final int leftFromGecko, final int topFromGecko) {
+ if (isBlockedFromAppearing) {
+ return;
+ }
if (layerView == null) {
layerView = aLayerView;
layerView.addZoomedViewListener(this);
@@ -625,6 +632,11 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
event.equals("Browser:ZoomToPageWidth") ||
event.equals("Browser:ZoomToRect")) {
stopZoomDisplay(true);
+ } else if (event.equals("FormAssist:AutoComplete")) {
+ isBlockedFromAppearing = true;
+ stopZoomDisplay(true);
+ } else if (event.equals("FormAssist:Hide")) {
+ isBlockedFromAppearing = false;
}
} catch (JSONException e) {
Log.e(LOGTAG, "JSON exception", e);
diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js
index 6fe0f3a3d73..3b6befdd55b 100644
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4808,10 +4808,12 @@ var BrowserEventHandler = {
break;
case "Gesture:SingleTap": {
+ let focusedElement = null;
try {
// If the element was previously focused, show the caret attached to it.
let element = this._highlightElement;
- if (element && element == BrowserApp.getFocusedInput(BrowserApp.selectedBrowser)) {
+ focusedElement = BrowserApp.getFocusedInput(BrowserApp.selectedBrowser);
+ if (element && element == focusedElement) {
let result = SelectionHandler.attachCaret(element);
if (result !== SelectionHandler.ERROR_NONE) {
dump("Unexpected failure during caret attach: " + result);
@@ -4825,6 +4827,17 @@ var BrowserEventHandler = {
let {x, y} = data;
if (this._inCluster && this._clickInZoomedView != true) {
+ // If there is a focused element, the display of the zoomed view won't remove the focus.
+ // In this case, the form assistant linked to the focused element will never be closed.
+ // To avoid this situation, the focus is moved and the form assistant is closed.
+ if (focusedElement) {
+ try {
+ Services.focus.moveFocus(BrowserApp.selectedBrowser.contentWindow, null, Services.focus.MOVEFOCUS_ROOT, 0);
+ } catch(e) {
+ Cu.reportError(e);
+ }
+ Messaging.sendRequest({ type: "FormAssist:Hide" });
+ }
this._clusterClicked(x, y);
} else {
if (this._clickInZoomedView != true) {