From 7f24887e479fa9e10c8023ec01ab55ca425f4e8a Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 22 Feb 2018 16:45:41 +0100 Subject: [PATCH] bar: floating panel is focused on mousedown instead of on mouseover (BC break in behavior) [Closes #269] --- src/Tracy/assets/Bar/bar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Tracy/assets/Bar/bar.js b/src/Tracy/assets/Bar/bar.js index 7a5b00e19..403bf7f4f 100755 --- a/src/Tracy/assets/Bar/bar.js +++ b/src/Tracy/assets/Bar/bar.js @@ -41,15 +41,22 @@ handles: elem.querySelectorAll('h1'), start: function() { _this.toFloat(); + _this.focus(); } }); - elem.addEventListener('mouseover', function(e) { + elem.addEventListener('mousedown', function(e) { if (isTargetChanged(e.relatedTarget, this)) { _this.focus(); } }); + elem.addEventListener('mouseover', function(e) { + if (isTargetChanged(e.relatedTarget, this)) { + clearTimeout(elem.Tracy.displayTimeout); + } + }); + elem.addEventListener('mouseout', function(e) { if (isTargetChanged(e.relatedTarget, this)) { _this.blur();