Backed out changeset 33ba7de82d52 (bug 1657567) for browser_markup failures CLOSED TREE

This commit is contained in:
Bogdan Tara 2020-10-06 13:45:14 +03:00
parent 4f1c35bfbd
commit 0ddec45053
2 changed files with 4 additions and 14 deletions

View File

@ -1311,16 +1311,13 @@ MarkupView.prototype = {
*
* @param {MarkupContainer} container
* The container we're navigating to.
* @return {Boolean}
* Returns true if the MarkupContainer was navigated to and marked selected.
* Returns false if the MarkupContainer is already selected.
*/
navigate: function(container) {
if (!container) {
return false;
return;
}
return this._markContainerAsSelected(container, "treepanel");
this._markContainerAsSelected(container, "treepanel");
},
/**

View File

@ -547,17 +547,10 @@ MarkupContainer.prototype = {
// target is the MarkupContainer itself.
this.hovered = false;
// Flag is true if the container was marked as selected, false if already selected.
const didNavigate = this.markup.navigate(this);
this.markup.navigate(this);
// Make container tabbable descendants tabbable and focus in.
this.canFocus = true;
// Avoid moving focus if the container was already selected.
// This prevents shifting horizontal scroll on repeated clicks
// on the container on narrow viewports. Bug 1657567
if (didNavigate) {
this.focus();
}
this.focus();
event.stopPropagation();
// Preventing the default behavior will avoid the body to gain focus on