Skip navigation
kbsbeme
Currently Being Moderated

Spry Dropdown Menu problem in Mobile Safari (iPad)

Apr 8, 2010 2:02 PM

I've used the stack SpryMenuBar.js in Dreamweaver to create a dropdown menu for a client (XponentMD.com).

 

When I Did a pass to optimize the site for the iPad, I found that the menu does not work properly. When you touch the top-level category, you go directly to the linked page and don't trigger the dropdown categories. I believe is it because the touch screen interface does not recognize focus and blur events.

 

It there and updated version of the SpryMenuBar.js that accommodates touch screen browsers like mobile Safari?

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Apr 8, 2010 6:54 PM   in reply to kbsbeme

    It is a well known and documented fact that the mouseover function (hover-event) is not recognized by touch screen devices.

     

    It is not just mouseover function. But there are other things we are used to on the web like viewing Tooltips, viewing the URL in the status bar on mouseover without clicking the link…they will all be gone from the web if we are accessing it from touch-based devices.

     

    Is it a good thing?.

     

    Touch has its own advantages and I am sure we will find some innovative alternatives.

     

    These are small compromises in adopting the next major step. Touch changes the way we use the web. We need to get used to it and web developers need to design their apps assuming this reality.

     

    While Spry does not cater specifically for touch screens, we have options to change the Spry behaviours. Like single clicking to simulate mouseover and double clicking to simulate the normal mouseclick function.

     

    I hope the above helps.

    Ben

     

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2010 10:30 PM   in reply to kbsbeme
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2010 10:39 PM   in reply to Al Sparber

    The Spry 2.0 menu bar is optimized for mobile and accessibility. You 

    should check it out

     

    Sent from my iPhone

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2010 7:12 AM   in reply to Arnout Kazemier

    Where can we download Spry 2.0?!?!

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2010 10:12 PM   in reply to ojbravo

    I get confused.

     

    I believe that Spry 2 has been called Spry UI.

     

    Spry UI is a complete rebuild of the Spry Widget framework. Spry UI  is more powerful, consistent and customizable than before. One of the  major changes is that all Spry UI now make use of the same base class.  Rather than creating a base for each widget, its now broken up in to  "components".

     

    All  Spry UI widgets come with a plugin based architecture so you can extend  the existing functionality simply by adding a plugin to your widget.

     

    You can  find more info about Spry UI at the Spry Site.
    http://labs.adobe.com/technologies/spry/ui/

     

    I hope this helps.

    Ben

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 19, 2010 8:00 PM   in reply to Ben Pleysier

    Hi:

     

    I was using the Spry Menu which shipped with DW CS4 and noticed nested links would not work on mobile Safari (iPhone, iPod, iPad).  I found the newer version and gave that a try:
    // SpryMenu.js - version 0.19 - Spry Pre-Release 1.7

     

    This works better, but there is still some issue.  I need to click on a nested menu item twice in order for it to register on mobile Safari.  If I have 2 nested menu items in a horizontal menu bar... I can also notice the following:
    Click on item1, then item2, then item1, then item2.. you will never get anywhere.   BUT.. click on either of them twice in a row and it works.

     

    I am guessing this can be fixed with an edit to the JavaScript somewhere inside the menu code.  Does anyone know which part will handle this so I can modify before an official change gets released (assuming one does which resolves this issue)?

     


    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2010 4:12 AM   in reply to dv_is_fun

    Download the Dreamweaver Widget Browser and use the Spry MenuBar 2.0.  This solved everything for me.

     

    Link:  http://labs.adobe.com/technologies/widgetbrowser/

     

    Godspeed,

    Omar

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2010 5:35 AM   in reply to ojbravo

    Hi:

     

    That is the one I am using... I got the latest version from the widget browser.  Any other suggestions?

     

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 21, 2010 7:46 PM   in reply to dv_is_fun

    Hi:

     

    I am using the latest version available... does anyone else see the same issue or know how to resolve this?  The menu system is really good.. but I need it to work on the mobile devices with touch.

     

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 28, 2010 12:19 AM   in reply to dv_is_fun

    Hi

     

    I can confirm that I have created a menu using the widget browser and it works fine on my iPhone. The trick is knowing how to get the drop-down menu to appear. I discovered that I had to just gently hold my finger on the top level menu for a short time and the sub-menu will appear.

    This is good news and I will now have to apply this to all my Spry menus out there.
    Thanks to the Spry Team for the Widget Browser - That can save quite a bit of time - wish I could find all the examples and docs for the new version though......

     

    Cheers

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 28, 2010 6:55 AM   in reply to WollombiWombat

    I was able to figure it out the other night actually.  I needed to change this:

    var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
          widgetID: "MenuBar",
          widgetClass: "MenuBar  MenuBarRightShrink",
          insertMenuBarBreak: false,
          mainMenuShowDelay: 100,
          mainMenuHideDelay: 200,
          subMenuShowDelay: 100,
          subMenuHideDelay: 200
          });

     

     

    To:

    var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
          widgetClass: "MenuBar  MenuBarRightShrink"
          });

     

     

     

    I had received the original delays by using the Adobe Widget Browser.  Somehow these mess up on Touch devices.  Removing them made it work just fine on real browsers and Touch browsers.

     

     

    Here are the docs I could find.. http://labs.adobe.com/technologies/spry/ui/docs/menubar.htm

     

     

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2010 4:09 AM   in reply to dv_is_fun

    Thanks. I noticed the same problem. I've removed the extra code from my html page and the drop-down menu works perfectly on a touch screen. One click activates the drop-down and a second activates the link.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2010 4:25 AM   in reply to kbsbeme

    I've just noticed that the menu bar apears to work fine on all browsers apart from IE8. It appears to loose all CSS styling. Any ideas for a work around.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2010 4:58 AM   in reply to Gareth81

    The fix

     

    Instead of

     

    var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
          widgetClass: "MenuBar  MenuBarLeftShrink",
          });

     

    Use

     

    var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", {
          widgetID: "MenuBar",
          widgetClass: "MenuBar  MenuBarLeftShrink",
          insertMenuBarBreak: true,
          });

     

    I have tested in all major browsers on Mac, PC and iPhone and all seems ok.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2010 12:43 AM   in reply to kbsbeme

    Marked topic as Assumed Answered

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 9, 2010 2:13 PM   in reply to Gareth81

    Hi:

     

    I had it working just fine in IE with what I had.  The only thing which doesn't work are my round corners (not supported in IE CSS) and the menu seems to float over the next float even though it is cleared.  Making the change you suggested does not do anything different for me.  My CSS worked fine in IE except for the above.

     

     

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2010 9:47 AM   in reply to kbsbeme

    I've been trying to get this to work properly but still have a problem.

     

    On my Iphone, clicking on a top level menu item does now open up the 2nd level menu but it ALSO sends me to the link I clicked on in the top level menu.

     

    Does anyone else have this problem or know how to solve it?

     

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2010 10:06 AM   in reply to Tojizimitz

    Do you have links on the top level items? If so, they will need to be replaced with just #. This seems to allow the menu option to contain a link and therefore use the css properties, but does not take the user away from the page.

     

    This worked for me on a site - http://www.rosshandling.co.uk

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2010 10:25 AM   in reply to kbsbeme

    Ah ok, I'll try that.

     

    Thanks for the input

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2010 5:29 PM   in reply to Tojizimitz

    I put together a test page using a menu created in the Spry widget jigger.

     

    I found that if I gently touch the top level menu for a short time and lift off, the second level menu appears   It takes about a second or less to achieve this otherwise on the iPhone a menu is presented with options to Open, Open in a new Page, Copy or Cancel.

     

    Try www.intellinet.com.au/spry/

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2011 10:54 AM   in reply to Gareth81

    This appears to be the perfect solution for my site as well. However, I can't seem to find the "old" lines of code that I need to replace.

     

    Looked at the top of my js file and it appears to be the most current from my Spry 2.0 widget.

     

    // SpryMenuBar.js - version 0.12 - Spry Pre-Release 1.6.1

     

    I wonder how I should proceed?

     

    thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2011 3:57 PM   in reply to chijo

    Hi

    Are you using all the required css files ??

     

    In my case, I eventually gave up on Spry and moved to jQuery/superfish. A far better choice.

     

    Good luck.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2011 4:01 PM   in reply to WollombiWombat

    Thanks for the reply.

     

    I'm not sure what you mean by using all the required CSS fields... sorry.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2011 4:11 PM   in reply to chijo

    css files - not fields.

     

    To produce a spry menu you need both the required js file and css files.

     

    If you have not yet done so, I suggest that you use the Adobe Widget Browser to generate a menu identical to what you need and save the created files then use that as a template for your site.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2011 4:26 PM   in reply to WollombiWombat

    Yes, thank. I realize I need both. I've already built multiple client sites with Spry using the widget and they are all functioning. We just noticed that it doens't work properly on touch devices. It's just a hit and miss with the touch gesture.

     

    I'd really like to implement that solution in this thread because the poster's site works great on touch.

     

    I just can't find that original code to replace it in the js file.

     

    thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 8:31 AM   in reply to Arnout Kazemier

    I don't agree at all that this question is answered (properly)!

     

    A drop down menu fully compatible with iPad and other touch devices should offer the possibility to also have a link in the top level menu entry!

     

    I've seen this already on various sites: First click shows the menu, second click goes to the top level menu entry link.

     

    So if someone has a patch for this (not really) great Spry2.0 Menu to allow this, THEN the answer will be answered.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 11:16 AM   in reply to keeluu

    I have just tested the Spry Menu Bar 2.0 on the Offiical iPad / phone simulator and It all works fine with touch. And if you add a url to the top level item it will just work fine.

     

    If you have a reproducable testcase with a unmodified Spry Menu Bar 2.0 please supply us with a online url.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 11:34 AM   in reply to Arnout Kazemier

    Thank you for the reply.

     

    Here's one site example: http://nwneighborhoodvet.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 11:56 AM   in reply to chijo

    You are still using the Spry Menu Bar from Spry 1.6.1, this version was not build to be used on touch devices, upgrading to Spry Menu Bar 2.0 would help

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 11:59 AM   in reply to Arnout Kazemier

    Yes, I realize that and that is what I outlined/explained in this forum. I am using the 2.0 widget and it produces the same 1.6.1 version of the js file. Where should be getting a different js file?

     

    thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 1:05 PM   in reply to chijo

    You are definitly not using the Spry 2.0 Menu Bar as the structure of the JS files and the license header of the Spry file you are using state 1.6.1.

    You can get Spry 2.0 Menu Bar through the Dreamweaver Widget Browser; http://labs.adobe.com/technologies/widgetbrowser/

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 1:05 PM   in reply to Arnout Kazemier

    Thanks for your answers.

     

    Looks like the browser on iPad simulator doesn't behave like the real touch device, because on iPad itself definitely all unmodified Spry 2.0 menus and also that example ( http://nwneighborhoodvet.com/ ) don't work properly. When I touch "About Us" on http://nwneighborhoodvet.com/, then it immediately loads http://nwneighborhoodvet.com/pages/about-us.html instead of displaying the drop down menu.

     

    Somehow I also don't understand your versioning scheme. I downloaded today again the so called Spry 2.0 Dropdown Menu with the Widget Browser and when I install it on my site the directory with the CSS and Javascripts inside is called Spry-UI-1.7. When this is supposed to be Spry 2.0, why don't you call it Spry-UI-2.7 or 2.0.7 or something similar? Or do I get the wrong version from that strange Widget Browser/Dreamweaver CS5?

     

    My test page (should be unmodified and it's not formatted properly at the moment) is http://www.safeexambrowser.org/Templates/main-D.dwt, also doesn't work properly on iPad.

     

    This is a example (jQuery Superfish) which is actually working on iPad: http://users.tpg.com.au/j_birch/plugins/superfish/#examples (see the menu below "The result:".

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 3:26 PM   in reply to Arnout Kazemier

    I just downloaded the widget yesterday.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 1:31 PM   in reply to keeluu

    Hi,

     

    The simulator behaves exactly the same the regular iPad, ( I just tested it on my iPad 3G, latest firmware and my iPad Wifi with origional firmware ).

     

    About the version scheme, the 2.0 is the widget's version. But it uses Spry UI 1.7 as core JavaScript framework. But I didn't make up the versioning, I'm just a humble Spry user .

     

    As for my testing I was testing: http://labs.adobe.com/technologies/spry/ui/samples/MenuBar2Sample.html which didn't have a url as top level item, just a single hash. And that worked fine, after modifing my local version of Spry I was able to reproduce the issue.

     

    It's probably fixable, with a few simple tweaks to the JavaScript files but I wonder what would be the adviced pattern than. If you have a touch enabled device the first "click" on the element, if no submenu is toggled should trigger the submenu. And if you click again on the element it would activate the <a> element?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 1:35 PM   in reply to keeluu

    This is a example (jQuery Superfish) which is actually working on iPad: http://users.tpg.com.au/j_birch/plugins/superfish/#examples (see the menu below "The result:".

    That menu bar behaves exactly the same as the SpryMenuBar, the example's top level menu items are all using hashes instead of URL's. Therefor you will not navigate to a new page if you tap on them.

     

    If you edit the item, and have it point to example.com it will also stop showing the menu bar.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 1:41 PM   in reply to Arnout Kazemier

    So, I'm still wondering where I am to get the 2.0 version.

     

    Thank you.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2011 1:45 PM   in reply to Arnout Kazemier

    .V1 schrieb:

     

    This is a example (jQuery Superfish) which is actually working on iPad: http://users.tpg.com.au/j_birch/plugins/superfish/#examples (see the menu below "The result:".

    That menu bar behaves exactly the same as the SpryMenuBar, the example's top level menu items are all using hashes instead of URL's. Therefor you will not navigate to a new page if you tap on them.

     

    If you edit the item, and have it point to example.com it will also stop showing the menu bar.

     

    No, the first top level menu item contains #a as a link:

                                  <a href="#a">menu item</a>
    
    If you click first time on the item, the URL doesn't get updated in the address field of the browser, only the sub menu is displayed. When you click second time on the item, then the URL gets updated to http://users.tpg.com.au/j_birch/plugins/superfish/#a
    Tomorrow (here in Europe it's already night) I will include that superfish menu in my website, then you'll see it's working...

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2011 8:27 PM   in reply to Arnout Kazemier

    How can a Dreamweaver user get ahold of a functioning iPad simulator (device central version seems static to the mouse click) to assist in testing pages, sprys, widgets etc.?

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points