Esc key in text fields discards entire dialog
<!-- --------Before Creating a New Issue-----------
* Limit report to a single issue.
* Search the issue tracker to verify the issue has not already been reported.
* Complete all instructions between `template comment markers <>.
* Keep report contents limited to the necessary information required to fix the issue.
* When creating an issue against the stable version of KiCad, make sure the latest available stable version is installed as issues may have already been resolved in later stable versions. -->
# Description
<!-- What is the current behavior and what is the expected behavior? -->
<!-- If the issue is visual/graphical, please attach screenshots of the problem. -->
<!-- Add the issue details below this line and before the "Steps to reproduce" heading. -->
This is incredibly annoying and I've run into it a few times, loosing small amounts of work, but pressing esc in an editable text field should cancel the edit of that field, not close the dialog. Several times I've updated several fields or 3d model positioning, only to fat finger an edit in some text field, to then press esc to escape from that text field edit without saving, only for the entire dialog to close (thus loosing all of the other field changes). I expect that would be the behavior of pressing esc twice, not once.
# Steps to reproduce
<!-- If there are multiple steps to reproduce it or it is a visual issue, then providing a screen recording as an attachment to this report is recommended. -->
<!-- If this issue is specific to a project, please attach the necessary files to this issue. -->
<!-- Add the steps to reproduce using the numbers below -->
<!-- Add new step numbers before the "KiCad Version" heading. -->
1. Go to a property dialog (symbol or footpring)
2. Enter text editing mode on a value that is not always a text field (one in the grid, or a 3d model path)
3. press esc to exit text editing mode, like excel or google sheets
4. The dialog is now closed
# KiCad Version
<!-- Copy version information (from main menu Help->About KiCad ->Copy Version Info) and paste it between the triple backticks below to preserve the formatting. -->
```
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 7.0.1, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 5.2.0
FontConfig 2.14.1
libcurl/7.86.0-DEV OpenSSL/3.0.8 zlib/1.2.12 nghttp2/1.52.0
Platform: , 64 bit, Little endian, wxGTK, mate, x11
Build Info:
Date: Apr 6 2023 18:03:11
wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.81.0
OCC: 7.7.0
Curl: 7.86.0-DEV
ngspice: 40
Compiler: GCC 12.2.0 with C++ ABI 1017
Build settings:
KICAD_SPICE=ON
```
issue