Jump to content

Problem with stock browser on android mobile devices


cmdr

Recommended Posts

Hello,

 

I installed Prestashop 1.6.0.5 on local computer (XAMPP V3.2.1, appache 2.4.7(win32), php 5.5.9, Mysql 5.6.16). When I access test site from mobile device with android (Samsung Galaxy S3 and Huawei Ascend G510) with stock browser (called "browser") there is problem with menus. 

 

When I touch on menu which have submenu items, "top" menu is closing submenu items immideatelly thus not allowing me to click on submenu item.

 

Prestashop: 1.6.0.5

theme: default prestashop theme

installation type: new

hosting: local

 

Link to comment
Share on other sites

  • 2 weeks later...

I tested mobile theme on Iphone, and it seems to work ok there. Problem is happening on android devices, when stock browser (called only "browser" is used). This video is recorded on Samsung Galaxy S3. Same thing is happening on other android devices,  when stock browser is used.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

I did not find any fix yet.

It seems related to the duration of the touch or something like that.

I think i am not expert enough to find the solution but if I knew where to look at, I would try to compare the settings of the main menu (which is working fine) with the settings of the submenu (which is not working).

Link to comment
Share on other sites

I did not find any fix yet.

It seems related to the duration of the touch or something like that.

I think i am not expert enough to find the solution but if I knew where to look at, I would try to compare the settings of the main menu (which is working fine) with the settings of the submenu (which is not working).

 

I had the same idea as you. I was thinking about the JavScripts in the "js" folder of the theme.

I applied some changes, but getting any result.

If you can tell me "where" to check, I'll be happy to make some test too.

I Googled about the issue... but with no luck.

Do you think that PrestaShop support could help us?

 

Anyway, it is funny.

On Galaxy S III and Windows Phone, no problem.

On Note II... there is.

 

I suppose this can be useful:

http://users.tpg.com.au/j_birch/plugins/superfish/

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

OK, I did find the fix.

 

The problem is on blocktopmenu.js (../themes/default-bootstrap/js/modules/blocktopmenu/js/blocktopmenu.js).

 

On the line 88:

change

$(".sf-menu .menu-mobile-grover").on('click touchstart', function(){

into

$(".sf-menu .menu-mobile-grover").on('touchstart, click', function(){ [This seems not working on Windows Phone stock browser]

 

Then, on the line 97:

change

 

catSubUl.slideUp();

 

into

 

catSubUl.slideToggle();

 

 

Thanks for watching...

 

Please, add to the Title [sOLVED]

 

 

[uPDATE]

A "simple & working way" seems to be going to delete JUST touchstart into the line 88.

Edited by hitomebore (see edit history)
  • Like 1
Link to comment
Share on other sites

Thanks for the fix hitomebore, I did not try it yet, but I'll let you know.

Do you think that your fix may impact (negatively) some other smartphones?

Well, today I made more tests.

 

It seems that the best fix is JUST to delete touchstart on the line 88.

 

Adding a comma, seems not working on Windows Phone devices.

 

Deleting "touchstart" makes things going fine on

 

Android 4.3 stock browser

Android 4.1.2 stock browser (but on this I didn't get any problem before)

Android Chrome v35.0

Android Firefox v30.0

Windows Phone 8.1 stock browser 

PC Internet Explorer v11 (resized page)

PC Firefox v30.0 (resized page)

Link to comment
Share on other sites

"BREAKING NEWS"

 

A friend of mine sugested to me to use "mousedow" instead of "click"... and it worked.

 

Then, I updated the blocktopmenu from Prestashop's Modules Update... and I did find that they used exactly  the same fix; "mousedown".

 

Strange life...

 

Thank you to Ōkuma sensei!

 

 

So, to end the story, simply...

 

UPDATE YOUR BLOCKTOPMENU MODULE!

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

Where are you pulling the update from, I don't get an option to update from modules screen?  When I change this to mousedown, I have to keep my finger on the menu to get it to display.  'click' without touchstart seems to work ok though.

Link to comment
Share on other sites

Where are you pulling the update from, I don't get an option to update from modules screen?  When I change this to mousedown, I have to keep my finger on the menu to get it to display.  'click' without touchstart seems to work ok though.

what module version you use at the moment?

Link to comment
Share on other sites

1.13

 

I couldn't get any of the options above to work, menu on android (stock and firefox tested), will only open if I press down until the menu is fully open, same with closing.  Works fine on windows phone though.

 

 

<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocktopmenu</name>
<displayName><![CDATA[Top horizontal menu]]></displayName>
<version><![CDATA[1.13]]></version>
<description><![CDATA[Adds a new horizontal menu to the top of your e-commerce website.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
Link to comment
Share on other sites

[sOLVED]

 

It is possible I did a mistake about the Module Update and it DOESN'T fix the problem.

 

On the other side, I can confirm that both just "click" or "mousedown" (instead of "click touchstart") on the line 88 work fine and fix the problem.

Important is to apply the fix at the right point.

 

.../themes/THEME_YOU_DID_CHOOSE/js/modules/blocktopmenu/js/blocktopmenu.js

 

Otherwhise, make a test on a "fresh" installation and then change just that in the theme you did choose.

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

yup, I have the edit in the right place (though my line 88 is blank, so it's there on line 89.  which also suggests that one if us is using something not quite standard..).

 

I'll be reinstalling a server tomorrow so we can check out if it works on a fresh install.  Getting no love from the change on test server.

Link to comment
Share on other sites

Still no luck with the browsers on my phone.

 

Fresh install of 1.6.0.8

Default Theme

No other changes other than the edit to line 89.

   - $(".sf-menu .menu-mobile-grover").on('click', function(){

 

Tested on stock browser, firefox, and chrome in Android.

 

Menu opens but you have to hold you finger down until it is fully open, otherwise it collapses back.

Same for closing.

 

I'll add yours to the server and see what happens.

 

Cheers

Link to comment
Share on other sites

  • 2 weeks later...

On lines 83, 89, 105 i removed the touchstart that came after 'click' and that menu seem to be working for me now.  My menus were only one deep though so i'm not sure if it matter.  regardless my top menu seems to be working.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
×
×
  • Create New...