[BUGFIX] parseInt values before comparison for Fluid be.widget.paginate 88/53688/2
authorWolfgang Klinger <wolfgang@wazum.com>
Sat, 12 Aug 2017 18:15:48 +0000 (20:15 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 14 Aug 2017 09:15:31 +0000 (11:15 +0200)
Resolves: #82034
Releases: master, 8.7
Change-Id: If56166e33c048a45b01ab70a5938a51525a49db4
Reviewed-on: https://review.typo3.org/53688
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/fluid/Resources/Private/Templates/ViewHelpers/Be/Widget/Paginate/Index.html

index 7413352..4c58d7d 100644 (file)
@@ -7,8 +7,8 @@
                function goToPage(formObject) {
                        var formField = formObject.elements['paginator-target-page'];
                        var url = formField.dataset.url;
-                       var numberOfPages = formField.dataset.numberOfPages;
-                       var page = formField.value;
+                       var numberOfPages = parseInt(formField.dataset.numberOfPages);
+                       var page = parseInt(formField.value);
                        if (page > numberOfPages) {
                                page = numberOfPages;
                        } else if (page < 1) {