From 33804a8cb291d148b6978ea0ba60ec0d08a9f4e5 Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Wed, 10 Apr 2019 15:16:26 -0500 Subject: [PATCH] SPARK-2255 - middle click will now close an open mini ob --- .../spark/Modules/Trading/Ladder/View/LadderOrdersHost.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/spark/Modules/Trading/Ladder/View/LadderOrdersHost.cs b/src/client/spark/Modules/Trading/Ladder/View/LadderOrdersHost.cs index 131f54707..05d66a2c5 100644 --- a/src/client/spark/Modules/Trading/Ladder/View/LadderOrdersHost.cs +++ b/src/client/spark/Modules/Trading/Ladder/View/LadderOrdersHost.cs @@ -157,6 +157,11 @@ namespace mbts.spark { nameof(OrderBookVM.is_row_collection_populated) ); popup.Closed += (sender, event_args) => (popup.DataContext as IDisposable)?.Dispose(); + popup.MouseUp += (sender, event_args) => { + if (event_args.ChangedButton == MouseButton.Middle) { + popup.IsOpen = false; + } + }; // This is useful for troubleshooting focus issues //popup.LostKeyboardFocus += (ss, ee) => { // System.Diagnostics.Debug.WriteLine($"Lost Focus Event - Current Focus: {mbts.utils.MiscUtils.who_has_keyboard_focus()}");