jQuery UI Widgets › Forums › Navigation › Menu, Context Menu › Vertical menu IE problem
Tagged: ie, jqxMenu, Menu, scroll, unselectable item, vertical menu
This topic contains 12 replies, has 2 voices, and was last updated by Nadezhda 9 years, 9 months ago.
-
AuthorVertical menu IE problem Posts
-
Hi,
When using the vertical Menu, I noticed that in IE (11), the page scrolls to the top of the jqxmenu, this makes menu items at the bottom (initially not visible on the page) unselectable.
This also happens with the verticalmenu example in the demos folder when makin the list longer or resizing the window so the full list is no longer completely visible.
I cannot find anything related to this when searchig the forums and the release notes. Is this a known issue and is there a fix for this?
Many thanks,
RaoulHello Raoul,
Thank you for your feedback. We reproduced the reported issue and will fix it as soon as possible.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Thank you Nadezhda!
Sorry, any idea when this will be fixed, is it weeks or months?
Thank you,
RaoulHi Raoul,
A possible solution to fix the above issue is to make the menu visible(disable scrolling) or prevent the default browser behavior on focus. In the second case you can use
event.preventDefault();
. I hope it would be helpful.Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hi Nadezhda,
What exectly do you mean with making the menu visible (disable scrolling)? I had a look at the API and can’t find anything related to this.
And how does option two work?
$("#jqxMenu").bind('focus', function (event) { event.preventDefault(); });
This doesn’t fix the problem. The problem happens when moving over an item with sub menus
$("#jqxMenu").on('shown', function (event) { event.preventDefault(); });
doesn’t work either.
Thanks,
RaoulHi Raoul,
To make menu visible means that you can use bigger window size so you can display the entire vertical menu. This issue is related to the IE browser not to jQWidgets so you didn’t find anything in the API. Please, find the following example which contains possible solution:
<!DOCTYPE html> <html lang="en"> <head> <title></title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> </head> <body> <div id='content'> <script type="text/javascript"> $(document).ready(function () { // Create a jqxMenu $("#jqxMenu").jqxMenu({ width: '120', mode: 'vertical' }); $("#jqxMenu").on("focus", function (event) { event.preventDefault(); }); $("#jqxMenu").css('visibility', 'visible'); }); </script> <div id='jqxWidget' style='width: 110px;'> <div id='jqxMenu' style="visibility: hidden;"> <ul> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> </ul> </div> </div> </div> </body> </html>
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Thank you for the reply!
I tried it and it seemed to work but after doing more tests it still seems unreliable. In the below example the page still scrolls to the top of the menu. The only difference is that we added some empty lines at the top and items are copied to make the menu larger.
Some things we seem to experience on our end:
1. after loading the page and moving for example over the first “About Us”, the menu jumps to the top
2. after loading the page and scrolling downwards and move over an item, the menu jumps to the top
3. after step 1 and 2, scrolling downwards again, everything works fineCan you try this? Any ideas?
<!DOCTYPE html> <html lang="en"> <head> <title></title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> </head> <body> <p> </p> <p> </p> <p> </p> <p> </p> <div id='content'> <script type="text/javascript"> $(document).ready(function () { // Create a jqxMenu $("#jqxMenu").jqxMenu({ width: '120', mode: 'vertical' }); $("#jqxMenu").on("focus", function (event) { event.preventDefault(); }); $("#jqxMenu").css('visibility', 'visible'); }); </script> <div id='jqxWidget' style='width: 110px;'> <div id='jqxMenu' style="visibility: hidden;"> <ul> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> <li><a href="#">Home</a></li> <li>About Us <ul> <li><a href="#">History</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">The Team</a> <ul> <li><a href="#">Brigita</a></li> <li><a href="#">John</a></li> <li><a href="#">Michael</a></li> <li><a href="#">Peter</a></li> <li><a href="#">Sarah</a></li> </ul> </li> <li><a href="#">Clients</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Press</a></li> <li><a href="#">FAQs</a></li> </ul> </li> <li>Services <ul> <li><a href="#">Product Development</a></li> <li><a href="#">Delivery</a></li> <li><a href="#">Shop Online</a></li> <li><a href="#">Support</a></li> <li><a href="#">Training & Consulting</a></li> </ul> </li> <li>Products <ul> <li><a href="#">New</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Used</a> <ul> <li><a href="#">Corporate Use</a></li> <li><a href="#">Private Use</a></li> </ul> </li> <li><a href="#">Featured</a></li> <li><a href="#">Top Rated</a></li> <li><a href="#">Prices</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Events</a></li> <li><a href="#">Careers</a></li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">Enquiry Form</a></li> <li><a href="#">Map & Driving Directions</a></li> <li><a href="#">Your Feedback</a></li> </ul> </li> </ul> </div> </div> </div> </body> </html>
Thanks,
RaoulHi Raoul,
You may use the above example without empty rows or just display the entire menu.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hi Nadezhda,
The empty rows were only added to see what happens when the JQWidgetds menu is not positioned exactly at the top. The same thing happens when using any other html making the menu appear inside the page, rather then pixel perfect at the top.
“Or just display the entire menu”, what if the menu doesn’t fit on the page due to either it’s position on the page and / or height of the menu? How can we display the entire menu in this case?
Is your first reply
Thank you for your feedback. We reproduced the reported issue and will fix it as soon as possible.
still scheduled?
I just need to know whether this component will work correctly cross browser.
Thanks,
RaoulHi Raoul,
If vertical menu doesn’t fit on the page it occurs the default focus behavior of browser which you observe in above examples. In this case you may use
event.preventDefault();
.The first post was my mistake because thе issue is related tо IE, not to jQWidgets.
Our menu works correctly in FF v37.0.1, Chrome v42.0.2311.90 using the latest version of jQWidgets (3.7.1).
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hi Nadezhda,
As mentioned above “event.preventDefault();” does not solve the problem, did you try the provided steps that result in the issues on our end? Or does this work flawless for you?
Different browser behaviour is a pain for developers. Sometimes it is a result of a bug in the specific browser. Regardless of what causes it, 3rd party solutions such as your awesome JQWidgets package are great because they deal with all that. As we are running in circles now and also because in your last reply you only mention FF and Chrome, I take it that in this case it doesn’t and it will not in the future.
Otherwise please let me know.
Thank you for your responses.
Raoul
Hi Raoul,
You can prevent scrolling behavior as you set the focus to be on the selected/hover menu item.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.