зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1331167 - fix TooltipToggle to hide tooltip when leaving target;r=Honza
MozReview-Commit-ID: 3pTi5DfEEPd --HG-- extra : rebase_source : d7ac7125d3fe8ee8e10affb34d3323518d357534
This commit is contained in:
Родитель
fa26ced4a4
Коммит
9dc4c7045d
|
@ -50,7 +50,7 @@ add_task(function* test() {
|
|||
|
||||
info("Checking if the image thumbnail is hidden when mouse leaves the menu widget");
|
||||
let requestsListContents = document.querySelector(".requests-list-contents");
|
||||
EventUtils.synthesizeMouse(requestsListContents, 0, 0, { type: "mouseout" },
|
||||
EventUtils.synthesizeMouse(requestsListContents, 0, 0, { type: "mousemove" },
|
||||
monitor.panelWin);
|
||||
yield waitUntil(() => !toolboxDoc.querySelector(".tooltip-container.tooltip-visible"));
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ add_task(function* () {
|
|||
|
||||
info("Move out of the container");
|
||||
let hidden = tooltip.once("hidden");
|
||||
EventUtils.synthesizeMouseAtCenter(container, { type: "mouseout" }, doc.defaultView);
|
||||
EventUtils.synthesizeMouseAtCenter(container, { type: "mousemove" }, doc.defaultView);
|
||||
yield hidden;
|
||||
|
||||
info("Destroy the tooltip and finish");
|
||||
|
|
|
@ -154,7 +154,7 @@ TooltipToggle.prototype = {
|
|||
|
||||
_onMouseOut: function (event) {
|
||||
// Only hide the tooltip if the mouse leaves baseNode.
|
||||
if (event && this._baseNode && !this._baseNode.contains(event.relatedTarget)) {
|
||||
if (event && this._baseNode && this._baseNode.contains(event.relatedTarget)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче