diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 6f6dff5abc..5226f6fb39 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -132,6 +132,7 @@
[Fix] List hidden groups on viewprofile where the viewing user is also a member. (Bug #31845)
[Fix] Sort viewprofile group list by group name.
[Fix] Do not unsubscribe users from topics replying with quickreply. (Bug #56235)
+ [Fix] Don't submit when pressing enter on preview button. (Bug #54395)
[Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)
[Change] Log activation through inactive users ACP. (Bug #30145)
[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 074c250b18..fa5de17448 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -424,11 +424,11 @@ function apply_onkeypress_event()
for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i])
{
- if (element.type == 'hidden')
- continue;
-
- // onkeydown is possible too
- element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
+ if (element.type == 'text' || element.type == 'password')
+ {
+ // onkeydown is possible too
+ element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
+ }
}
}