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:
Julian Descottes 2016-12-08 07:41:49 +01:00
Родитель fa26ced4a4
Коммит 9dc4c7045d
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;
}