* [misc] change trigger to click of dropdown with hover trigger.

This commit is contained in:
sunhao
2024-09-04 17:31:41 +08:00
committed by 王于听
parent 47e2e6117f
commit b3b4e1d2d0
+6
View File
@@ -252,6 +252,12 @@ function highlightStepTarget($target, step, popoverOptions)
if(typeof $target === 'function') $target = $target(scope);
$target = $target.first();
if(!$target.length) return console.error(`[TUTORIAL] Cannot find target for step "${step.guide.title || step.guide.name} > ${step.task.title || step.task.name} > ${step.title}"`, step);
if($target.is('[data-toggle="dropdown"]'))
{
if($target.is('[data-trigger="hover"]')) $target.attr('data-trigger', 'click');
const dropdown = $target.zui('dropdown');
if(dropdown && dropdown.options.trigger === 'hover') dropdown.destroy();
}
popoverOptions = $.extend(
{
key : step.id,