Skip to content

Commit

Permalink
[BUGFIX] Trigger submit of RSA encrypted form properly
Browse files Browse the repository at this point in the history
The change of #76120 changed the selector of possible submit buttons.
However, in Firefox a submit is not triggered when a focussed submit
element is clicked via JavaScript.

The code is changed to enforce a submit of the form instead.

RsaEncryptionWithLib.min.js created with:
../../../../../../Build/node_modules/uglify-js/bin/uglifyjs \
RsaLibrary.js RsaEncryption.js > RsaEncryptionWithLib.min.js

Resolves: #84253
Related: #76120
Releases: master, 8.7, 7.6
Change-Id: Id30f4536dccec28edc0d909114c8fde71614bc30
Reviewed-on: https://review.typo3.org/56142
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
  • Loading branch information
andreaskienast authored and andreaswolf committed Mar 16, 2018
1 parent 011c292 commit 16b7d84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -119,7 +119,7 @@ define(['jquery', './RsaLibrary'], function($) {
// Try to fetch the field which submitted the form
var $currentField = RsaEncryption.$currentForm.find('input[type=submit]:focus,input[type=image]:focus,button:focus');
if ($currentField.length === 1) {
$currentField.trigger('click');
RsaEncryption.$currentForm.trigger('submit');
} else {
// Create a hidden input field to fake pressing the submit button
var name = 'commandLI',
Expand Down

0 comments on commit 16b7d84

Please sign in to comment.