Add check for open submenu and add tolerance to x axis