357131c4e27b8116f9930bdf600b53403a581556 kate Mon Jul 17 15:07:22 2017 -0700 Fix trackUi popup position. Fixes bugs where popup moves around and sometimes disappears after using Apply button. Credit to Joe Thomas for troubleshooting. refs #16948 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 94d8002..3f28ae9 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -3763,32 +3763,36 @@ cache: true }, resizable: true, // Let description scroll vertically height: (popUp.trackDescriptionOnly ? popMaxHeight : 'auto'), width: popWidth, minHeight: 200, minWidth: 400, maxHeight: popMaxHeight, maxWidth: popMaxWidth, modal: true, closeOnEscape: true, autoOpen: false, buttons: uiDialogButtons, // popup.ready() doesn't seem to work in open. + open: function(event) { + // fix popup to a location -- near the top and somewhat centered on the browser image + $(event.target).parent().css('position', 'fixed'); + $(event.target).parent().css('top', '18%'); + $(event.target).parent().css('left', '30%'); - open: function () { if (!popUp.trackDescriptionOnly) { $('#hgTrackUiDialog').find('.filterBy,.filterComp').each( function(i) { if ($(this).hasClass('filterComp')) ddcl.setup(this); else ddcl.setup(this, 'noneIsAll'); } ); } }, close: function() { popUp.cleanup(); } });