Position the LFA file selection popup if it's partially off-screen.

master
Pacman Ghost 4 years ago
parent 2cbd84adcc
commit b318507953
  1. 1
      vasl_templates/webapp/static/css/lfa.css
  2. 8
      vasl_templates/webapp/static/lfa.js

@ -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 ;

@ -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 ) ;
} ) ;

Loading…
Cancel
Save