SEBWIN-413: Fixed clearing of results for text search.

This commit is contained in:
Damian Büchel 2020-08-26 13:03:17 +02:00
parent 86594b23ca
commit 4345ac22cd
2 changed files with 18 additions and 2 deletions

View file

@ -215,6 +215,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
private void FindbarCloseButton_Click(object sender, RoutedEventArgs e)
{
FindRequested?.Invoke("thisisahacktoclearthesearchresultsasitappearsthatthereisnosuchfunctionalityincef", true, false);
Findbar.Visibility = Visibility.Collapsed;
}
@ -230,7 +231,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
private void FindTextBox_KeyUp(object sender, KeyEventArgs e)
{
FindRequested?.Invoke(FindTextBox.Text, true, FindCaseSensitiveCheckBox.IsChecked == true);
if (string.IsNullOrEmpty(FindTextBox.Text))
{
FindRequested?.Invoke("thisisahacktoclearthesearchresultsasitappearsthatthereisnosuchfunctionalityincef", true, false);
}
else
{
FindRequested?.Invoke(FindTextBox.Text, true, FindCaseSensitiveCheckBox.IsChecked == true);
}
}
private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset)

View file

@ -215,6 +215,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
private void FindbarCloseButton_Click(object sender, RoutedEventArgs e)
{
FindRequested?.Invoke("thisisahacktoclearthesearchresultsasitappearsthatthereisnosuchfunctionalityincef", true, false);
Findbar.Visibility = Visibility.Collapsed;
}
@ -230,7 +231,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
private void FindTextBox_KeyUp(object sender, KeyEventArgs e)
{
FindRequested?.Invoke(FindTextBox.Text, true, FindCaseSensitiveCheckBox.IsChecked == true);
if (string.IsNullOrEmpty(FindTextBox.Text))
{
FindRequested?.Invoke("thisisahacktoclearthesearchresultsasitappearsthatthereisnosuchfunctionalityincef", true, false);
}
else
{
FindRequested?.Invoke(FindTextBox.Text, true, FindCaseSensitiveCheckBox.IsChecked == true);
}
}
private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset)