Explorar el Código

View.Mouse cleanup - Fixed combobox

Tig hace 11 meses
padre
commit
0a6ba8315b
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      Terminal.Gui/Views/ComboBox.cs

+ 9 - 1
Terminal.Gui/Views/ComboBox.cs

@@ -840,6 +840,14 @@ public class ComboBox : View, IDesignable
         {
             bool isMousePositionValid = IsMousePositionValid (me);
 
+            var res = false;
+
+            if (isMousePositionValid)
+            {
+                // We're derived from ListView and it overrides OnMouseEvent, so we need to call it
+                res = base.OnMouseEvent (me);
+            }
+
             if (HideDropdownListOnClick && me.Flags == MouseFlags.Button1Clicked)
             {
                 if (!isMousePositionValid && !_isFocusing)
@@ -872,7 +880,7 @@ public class ComboBox : View, IDesignable
                 return true;
             }
 
-            return false;
+            return res;
         }
 
         public override void OnDrawContent (Rectangle viewport)