зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1486364 - Revert changes in Tree component and test; r=jdescottes.
In https://github.com/devtools-html/debugger.html/pull/6809 a check was removed in the Tree component because seens as unnecessary, and a test was modified to accomodate the change. Turns out the test was needed in its original form, and was surfacing a bug. This patch rolls back both the change in the Tree component _and_ in the test. The Tree modification will be backported to the Github repository. Differential Revision: https://phabricator.services.mozilla.com/D4307 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d17844e0bf
Коммит
226365011f
|
@ -4465,7 +4465,17 @@ class Tree extends Component {
|
|||
if (focused || !nativeEvent || !this.treeRef) {
|
||||
return;
|
||||
}
|
||||
this._focus(traversal[0].item);
|
||||
|
||||
const { explicitOriginalTarget } = nativeEvent;
|
||||
// Only set default focus to the first tree node if the focus came
|
||||
// from outside the tree (e.g. by tabbing to the tree from other
|
||||
// external elements).
|
||||
if (
|
||||
explicitOriginalTarget !== this.treeRef &&
|
||||
!this.treeRef.contains(explicitOriginalTarget)
|
||||
) {
|
||||
this._focus(traversal[0].item);
|
||||
}
|
||||
},
|
||||
onBlur: this._onBlur,
|
||||
"aria-label": this.props.label,
|
||||
|
|
|
@ -39,7 +39,8 @@ add_task(async function() {
|
|||
});
|
||||
|
||||
info("Expand the last node");
|
||||
lastNode.click();
|
||||
const view = lastNode.ownerDocument.defaultView;
|
||||
EventUtils.synthesizeMouseAtCenter(lastNode, {}, view);
|
||||
await onOiMutation;
|
||||
|
||||
is(scrollTop, outputContainer.scrollTop,
|
||||
|
|
Загрузка…
Ссылка в новой задаче