Reply To: Close sub menu when hitting TAB

Home Forums Older releases 0.9.x Close sub menu when hitting TAB Reply To: Close sub menu when hitting TAB


OK, here are quick instructions for v0.9.7:

1) In “sm-core-css.css” replace the following line: ul{position:absolute;top:-999999px;width:100px;}

with the following: ul{display:none;position:absolute;}

2) In “jquery.smartmenus.js” replace the following:

(!this.isTouchMode() ||

with the following:

this.focusActivated && (!this.isTouchMode() ||

3) In “jquery.smartmenus.js” replace all occurrences of the following:

this.clickActivated = false;

with the following:

this.clickActivated = false;
this.focusActivated = false;

4) In “jquery.smartmenus.js” find the current “itemClick” method and replace it with the following:

			itemClick: function(e) {
				if (this.isTouchScrolling) {
					this.isTouchScrolling = false;
					return false;
				var $a = $(e.currentTarget);
				if (!this.handleItemEvents($a)) {
				if (this.$root.triggerHandler('click.smapi', $a[0]) === false) {
					return false;
				// undo fix: prevent the address bar on iPhone from sliding down when expanding a sub menu
				if ($a.dataSM('href')) {
					$a.attr('href', $a.dataSM('href')).removeDataSM('href');
				var $sub = $a.parent().dataSM('sub');
				// if the sub is not visible
				if ($sub && (!$sub.dataSM('shown-before') || !$':visible'))) {
					// try to activate the item and show the sub
					// if "itemActivate" showed the sub, prevent the click so that the link is not loaded
					// if it couldn't show it, then the sub menus are disabled with an !important declaration (e.g. via mobile styles) so let the link get loaded
					if ($':visible')) {
						this.focusActivated = true;
						return false;
				} else if (this.opts.showOnClick && $a.parent().parent().dataSM('level') == 1 && $sub) {
					this.clickActivated = true;
					return false;
				if ($a.hasClass('disabled')) {
					return false;
				if (this.$root.triggerHandler('select.smapi', $a[0]) === false) {
					return false;



You will be emailed a link to set your password.


Lost password?