Don't close dropdowns on a scroll event in a hidden editor

This commit is contained in:
Narciso Jaramillo 2012-09-18 13:15:12 -07:00
Родитель f262bd4381
Коммит 19d6a24af7
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -585,8 +585,12 @@ define(function (require, exports, module) {
$(self).triggerHandler("cursorActivity", [self]);
});
this._codeMirror.setOption("onScroll", function (instance) {
// close all dropdowns on scroll
Menus.closeAll();
// If this editor is visible, close all dropdowns on scroll.
// (We don't want to do this if we're just scrolling in a non-visible editor
// in response to some document change event.)
if (self.isFullyVisible()) {
Menus.closeAll();
}
$(self).triggerHandler("scroll", [self]);