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?
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
You might find this article interesting:
http://www.projectseven.com/products/menusystems/pmm2/ug-examples/acce ssible/index.htm
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
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!
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
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
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.
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.
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.
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
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
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.
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.
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.
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.
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.
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/
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:".
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?
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.
.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>
North America
Europe, Middle East and Africa
Asia Pacific