fix(module: dropdown): context menu would show on "OnClick" event (#678)

Co-authored-by: James Yeung <shunjiey@hotmail.com>
This commit is contained in:
笨木头 2020-10-14 17:42:57 +08:00 committed by GitHub
parent 20ec26034d
commit 3ca6a1ba96

View File

@ -202,7 +202,7 @@ namespace AntDesign.Internal
protected virtual async Task OnTriggerClick()
{
if (IsContainTrigger(TriggerType.Click) || IsContainTrigger(TriggerType.ContextMenu))
if (IsContainTrigger(TriggerType.Click))
{
if (_overlay.IsPopup())
{
@ -213,6 +213,10 @@ namespace AntDesign.Internal
await Show();
}
}
else if (IsContainTrigger(TriggerType.ContextMenu) && _overlay.IsPopup())
{
await Hide();
}
}
protected virtual async Task OnTriggerContextmenu(MouseEventArgs args)