Commit 9646aec0 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Folder View] Accept and reject Escape event appropriately

When renaming, accept the Escape key event to prevent the containment from leaving Showing
Desktop mode. Otherwise don't accept it and let the containment do its thing.

BUG: 352988
FIXED-IN: 5.11.0

Differential Revision: https://phabricator.kde.org/D7631
parent 2465c5bc
......@@ -870,6 +870,7 @@ Item {
Keys.onEscapePressed: {
if (!editor.targetItem) {
dir.clearSelection();
event.accepted = false;
}
}
......@@ -1219,7 +1220,10 @@ Item {
commit();
break;
case Qt.Key_Escape:
targetItem = null;
if (targetItem) {
targetItem = null;
event.accepted = true;
}
break;
case Qt.Key_Home:
editor.select(0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment