We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f56186 commit fd4f069Copy full SHA for fd4f069
js/com/component/PopupComponent.js
@@ -792,7 +792,20 @@ define([
792
open() {
793
vpLog.display(VP_LOG_TYPE.DEVELOP, 'open popup', this);
794
this.loadState();
795
+
796
this.show();
797
798
+ // set popup position if its top-left side is outside of view
799
+ let pos = $(this.wrapSelector()).position();
800
+ if (pos) {
801
+ if (pos.top < 0) {
802
+ $(this.wrapSelector()).css({ top: 0 });
803
+ }
804
+ if (pos.left < 0) {
805
+ $(this.wrapSelector()).css({ left: 0 });
806
807
808
809
this._bindCodemirror();
810
811
$(this.eventTarget).trigger({
0 commit comments