diff --git a/vasl_templates/webapp/static/css/lfa.css b/vasl_templates/webapp/static/css/lfa.css index 398ab65..2b5ef70 100644 --- a/vasl_templates/webapp/static/css/lfa.css +++ b/vasl_templates/webapp/static/css/lfa.css @@ -79,6 +79,7 @@ /* player colors popup */ #lfa .player-colors-popup, #lfa .select-file-popup { + position: absolute ; border: 1px solid #aaa ; border-radius: 5px ; background: #f8f8f8 ; z-index: 100 ; diff --git a/vasl_templates/webapp/static/lfa.js b/vasl_templates/webapp/static/lfa.js index 0d0f9e8..783f3dc 100644 --- a/vasl_templates/webapp/static/lfa.js +++ b/vasl_templates/webapp/static/lfa.js @@ -411,11 +411,9 @@ function initSelectFilePopup() gEventHandlers.addHandler( $gBanner.find( ".select-file" ), "click", function( evt ) { // show the popup closeAllPopupsAndDropLists() ; - var pos = $(this).offset() ; - $gSelectFilePopup.css( { position: "absolute", - top: pos.top + $(this).height(), - left: pos.left + $(this).outerWidth() - $gSelectFilePopup.outerWidth() - 2, - } ).show() ; + $gSelectFilePopup.show().position( { + my: "right top", at: "right+3 bottom+5", of: $(this), collision: "fit" + } ) ; $currSel.prop( "checked", true ).focus() ; stopEvent( evt ) ; } ) ;