mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Backed out changeset 33ba7de82d52 (bug 1657567) for browser_markup failures CLOSED TREE
This commit is contained in:
parent
4f1c35bfbd
commit
0ddec45053
@ -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");
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user