fix highlight for submenu anchor

This commit is contained in:
Rolux 2010-02-05 21:12:52 +05:30
parent 17e5faf3a0
commit 969aae1c47

View file

@ -457,6 +457,7 @@ requires
}; };
$(function() { $(function() {
// fixme: how to do this better?
if ($.browser.safari) { if ($.browser.safari) {
$document.keydown(keydown); $document.keydown(keydown);
} else { } else {
@ -2044,6 +2045,10 @@ requires
if (self.options.selected > -1) { if (self.options.selected > -1) {
that.items[self.options.selected].trigger("mouseleave"); that.items[self.options.selected].trigger("mouseleave");
} }
if (self.options.parent) {
console.log(self.options.element)
self.options.element.removeClass("OxSelected");
}
that.loseFocus(); that.loseFocus();
that.unbindEvent({ that.unbindEvent({
key_up: selectPreviousItem, key_up: selectPreviousItem,
@ -2221,7 +2226,7 @@ requires
} }
function mouseleave() { function mouseleave() {
if (!self.options.disabled && !self.options.submenu) { if (!self.options.disabled && !self.options.items.length) {
that.removeClass("OxSelected"); that.removeClass("OxSelected");
self.options.menu.options({ self.options.menu.options({
selected: -1 selected: -1