Skip to content

Commit 0edaf85

Browse files
authored
Ensured ComboBox is not closed when scrolling
Resolves issue #471
1 parent c033ac9 commit 0edaf85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

MaterialDesignThemes.Wpf/PopupBox.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,9 @@ private static void OnLostMouseCapture(object sender, MouseEventArgs e)
659659
{
660660
if (popupBox.StaysOpen && popupBox.IsPopupOpen)
661661
{
662+
// Fix for ComboBox scrolling
663+
if (GetCapture() != IntPtr.Zero) return;
664+
662665
// Take capture back because click happend outside of control
663666
Mouse.Capture(popupBox, CaptureMode.SubTree);
664667
e.Handled = true;

0 commit comments

Comments
 (0)