Jump to content

drop down selection shows for less than a second :(


Recommended Posts

Hi guys,

 

I have PrestaShop™ 1.6.0.6

 

My theme is called bicycle. I got it here: http://prestadevelop...ycle-theme.html

 

The theme is responsive.

 

Anyway, I tested my site on my tablet (I've only been working with it on a laptop so far). On my tablet, I visit a product page (this page, for example: ). I try to make a selection from the three different drop down selections on my product page, but the selections only show for less than a second and then disappear. I don't get a chance to select which option I want for my product! :(

 

Help, please. :)

Link to comment
Share on other sites

This seems to be happening to all drop down option selections when I access my web site from my tablet. For example, in checkout, I try to select my state, and I am unable to because the drop down list shows up for less than a second then disappears. :(

Link to comment
Share on other sites

Hi Vekia,

 

It's just like that, except it ONLY happens for drop down options. (For example, here is one prouduct on my site - you try to select options for weight, the weight options show up for less than a second, then disappear. The other stuff, like categories and cart are working fine.

 

Thank you! :)

Edited by gracenote (see edit history)
Link to comment
Share on other sites

The code in my blocktopmenu.js file is different from what I see in the github link: https://github.com/PrestaShop/PrestaShop/commit/43cebac3dcb6fcd4856d3a98593da242715782e4

 

My code reads as follows, it's at the end where it's different: 

 

 
var responsiveflagMenu = false;
var categoryMenu = $('ul.sf-menu');
var mCategoryGrover = $('.sf-contener .cat-title');
 
$(document).ready(function(){
responsiveMenu();
$(window).resize(responsiveMenu);
});
 
// check resolution
function responsiveMenu()
{
   if ($(document).width() <= 767 && responsiveflagMenu == false)
{
menuChange('enable');
responsiveflagMenu = true;
}
else if ($(document).width() >= 768)
{
menuChange('disable');
responsiveflagMenu = false;
}
}
 
// init Super Fish Menu for 767px+ resolution
function desktopInit()
{
mCategoryGrover.off();
mCategoryGrover.removeClass('active');
$('.sf-menu > li > ul').removeClass('menu-mobile').parent().find('.menu-mobile-grover').remove();
$('.sf-menu').removeAttr('style');
categoryMenu.superfish('init');
$('.sf-menu > li > ul').addClass('submenu-container clearfix'); //add class for width define
i = 0;
$('.sf-menu > li > ul > li:not(#category-thumbnail)').each(function(){  //add classes for clearing
i++;
if(i%2 == 1)
$(this).addClass('first-in-line-xs');
else if (i%5 == 1)
$(this).addClass('first-in-line-lg');
});
}
 
function mobileInit()
{
categoryMenu.superfish('destroy');
$('.sf-menu').removeAttr('style');
 
mCategoryGrover.on('click', function(){
$(this).toggleClass('active').parent().find('ul.menu-content').stop().slideToggle('medium');
});
 
$('.sf-menu > li > ul').addClass('menu-mobile clearfix').parent().prepend('<span class="menu-mobile-grover"></span>');
 
$(".sf-menu .menu-mobile-grover").on('click touchstart', function(){
var catSubUl = $(this).next().next('.menu-mobile');
if (catSubUl.is(':hidden'))
{
catSubUl.slideDown();
$(this).addClass('active');
}
else
{
catSubUl.slideUp();
$(this).removeClass('active');
}
return false;
});
 
if ('ontouchstart' in document.documentElement)
{
$('#block_top_menu > ul:first > li > a').on('click', function(e){
if ($(this).parent('li').find('ul').length)
e.preventDefault();
});
}
}
 
// change the menu display at different resolutions
function menuChange(status)
{
status == 'enable'? mobileInit(): desktopInit();
}
Link to comment
Share on other sites

This is frustrating. I thought perhaps it might be my theme. So I put my site on the bootstrap theme. Same problem there. Went back to my bicycle theme. I also tested my site (penguinyell.com) on both of my mobile devices (both on android) - a samsung tablet and an lg smart phone. Problem still there. 

Link to comment
Share on other sites

  • 3 weeks later...

Hi jazzin! Sorry to say, the only solution I came to was hiring someone to take care of it for me. :(

 

But, you were able to get it fixed? Do you happen to know what they did to fix the issue?

 

What version of Prestashop are you running? I'm curious if I upgrade to the latest version it may help.

Link to comment
Share on other sites

Hi Jazzin, 

 

The guy I hired was able to fix it. There were a few bugs after the initial fix, but he was quick to resolve those too. I don't know what he did to fix it -- it appeared to me like quite a bit of complex coding was involved. He spent a day on it, and then another day resolving bugs. And this guy is a trained developer.

 

I run prestashop 1.6

 

I really hope you're able to resolve it. It really is frustrating.  

Link to comment
Share on other sites

  • 2 months later...
  • 9 months later...
  • 4 weeks later...

Hello,

 

This issue appeared to me too, and I realized that the root of the problem is when you open the select on the Samsung browser (sbrowser or called simply internet) it fires the resize event.

 

At the bottom of the 15-jquery.uniform-modified.js there is a resize event whis is updating all of the uniformized selects and file inputs.

This update makes the open drop downs close.

 

My solution is for simply not listening to this event if the user agent has 'SAMSUNG' in it.

Maybe there is a better solution for this, but right now I don't have more time for this.

 

the changed part at the end of the file:


// refresh uniform selects on document width change
if (navigator.userAgent.indexOf('SAMSUNG') == -1 ) {
    $(window).resize(
     function () {
            //there is a bug with this on the default samsung browser called sbrowser or 'internet' on the samsung devices by default. opening the select is firing a resize event. simply we don't care about the resize here on these browsers.
               $.uniform.update("select.form-control, input[type='file']"); 
          }
    );
}

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...