Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-13975

Jump to Page does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 3.1.5
    • JavaScript / AJAX

      At the moment the Jump to page function does not work with Firefox. Try it in your forum

      The error is the if-check in the function "pageJump" in forum_fn.js:
      if (page !== null && !isNaN(page) && page === Math.floor(page) && page > 0)

      This is never true: page === Math.floor(page)
      Because page is a String and Math.floor(page) an integer.

      Solution 1: Do not check the type:
      page == Math.floor(page)

      Solution 2: Cast the String to Integer:
      Number(page) === Math.floor(page)

            Unassigned Unassigned
            Tacitus89 Tacitus89 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: