Skip to content

Commit

Permalink
Merge branch 'develop' into pr/fix-10299
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jun 9, 2022
2 parents 5070269 + b8eb2bb commit 70d9088
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/web/assets/cp/src/js/FieldLayoutDesigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,14 @@ Craft.FieldLayoutDesigner = Garnish.Base.extend(
});

this.addListener(this.$fieldSearch, 'keydown', (ev) => {
if (ev.keyCode === Garnish.ESC_KEY) {
this.$fieldSearch.val('').trigger('input');
switch (ev.keyCode) {
case Garnish.ESC_KEY:
this.$fieldSearch.val('').trigger('input');
break;
case Garnish.RETURN_KEY:
// they most likely don't want to submit the form from here
ev.preventDefault();
break;
}
});

Expand Down

0 comments on commit 70d9088

Please sign in to comment.