Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix for #5426 (Quick View popup closes & reopens when moving mouse rightward) #5428

Merged
merged 2 commits into from
Oct 15, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/extensions/default/QuickView/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,16 @@ define(function (require, exports, module) {
}
lastPos = pos;

// No preview if mouse is past last char on line
if (pos.ch >= editor.document.getLine(pos.line).length) {
hidePreview();
return;
}

// Is there already a popover provider and range?
if (popoverState) {
if (popoverState.start && popoverState.end &&
editor.posWithinRange(pos, popoverState.start, popoverState.end)) {
editor.posWithinRange(pos, popoverState.start, popoverState.end, 1)) {
// That one's still relevant - nothing more to do
return;
} else {
Expand All @@ -607,12 +613,6 @@ define(function (require, exports, module) {
}
}

// No preview if mouse is past last char on line
if (pos.ch >= editor.document.getLine(pos.line).length) {
hidePreview();
return;
}

// Initialize popoverState
popoverState = {};

Expand Down