From 2e853ba316bcd52502aa8c93e2e6acaa4083750e Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 13 Oct 2018 12:06:34 +0200 Subject: [PATCH] Ox.Menu: deselect when mouse moves over disabled item --- source/UI/js/Menu/Menu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/UI/js/Menu/Menu.js b/source/UI/js/Menu/Menu.js index 52c9a248..492ad340 100644 --- a/source/UI/js/Menu/Menu.js +++ b/source/UI/js/Menu/Menu.js @@ -245,8 +245,12 @@ Ox.Menu = function(options, self) { if ($target.is('.OxCell')) { position = $parent.data('position'); item = that.items[position]; - if (!item.options('disabled') && position != self.options.selected) { - selectItem(position); + if (position != self.options.selected) { + if (!item.options('disabled')) { + selectItem(position); + } else { + mouseleave(); + } } } else { mouseleave();