diff --git a/JL.Windows/GUI/PopupWindow.xaml.cs b/JL.Windows/GUI/PopupWindow.xaml.cs index 5138cfd7..9c91f7d0 100644 --- a/JL.Windows/GUI/PopupWindow.xaml.cs +++ b/JL.Windows/GUI/PopupWindow.xaml.cs @@ -2010,8 +2010,11 @@ private void Window_ContextMenuOpening(object sender, ContextMenuEventArgs e) private void PopupListView_MouseLeave(object sender, MouseEventArgs e) { - _listViewItemIndex = _firstVisibleListViewItemIndex; - LastSelectedText = LastLookupResults[_listViewItemIndex].PrimarySpelling; + if (!PopupContextMenu.IsVisible) + { + _listViewItemIndex = _firstVisibleListViewItemIndex; + LastSelectedText = LastLookupResults[_listViewItemIndex].PrimarySpelling; + } } private TextBox? GetDefinitionTextBox(int listViewIndex)