Only on the first pop-up the hidden direction form has the right hight, the other forms are too high. The attached patch fixes this.

CommentFileSizeAuthor
gmap_blocks.form_height.patch1.19 KBsutharsan

Comments

mstrelan’s picture

I have come up with a solution for this. Probably needs a patch

gmap_blocks.js approx line 209

original:

    $('.gmap-blocks-directions-visible', form).hide();
    $('.gmap-blocks-directions-hidden', form).css({'visibility': 'visible'});

    $('.form-text', form).focus(function() {
      $(this).val('').css({'color': 'black'});
    });

replacement:

    var visible_elements = $('.gmap-blocks-directions-visible', form);
    var hidden_elements = $('.gmap-blocks-directions-hidden', form);
    visible_elements.removeClass('gmap-blocks-directions-visible').addClass('gmap-blocks-directions-hidden');
    hidden_elements.removeClass('gmap-blocks-directions-hidden').addClass('gmap-blocks-directions-visible');
    
    $('.form-text', form).focus(function() {
      $(this).val('').css({'color': 'black'});
    });
    
    hidden_elements.find('.form-text').focus();

gmap_blocks.css

.gmap-blocks-directions-hidden {
  display: none;
}
.gmap-blocks-directions-visible {
  display: block;
}
mstrelan’s picture

Actually mine is a different issue. The issue being the hidden direction form adds unnecessary white space below the link (which can cause a scroll bar to appear).

yeager’s picture

I have the same problem. (scrollbars and height issues.)

mstrelan’s picture

Event better to this include the jQuery.ScrollTo plugin and change my above code

old code

    hidden_elements.find('.form-text').focus();

new code

    directions_input = hidden_elements.find('.form-text'); 
    directions_input.focus();
    $('#gmap-blocks-info-window-1-1').parents('div:first').scrollTo(directions_input, {duration: 700});
skilip’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.