Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5270

Do not set the location.hash when clicking on a link

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.9.0
    • 6.10.0, 7.0.0-M1
    • wicket
    • None

    Description

      Clicking an AjaxLink or SubmitLink sets the location.hash to an empty value (..../someUrl?some=param#).
      This interferes with JavaScript libraries which need to use 'hashchange' event.

      Additionally in two of our apps we experience a strange page reloads after clicking on AjaxLink.
      The issue is not easy to reproduce but it seems to be caused by the used href="#" somehow.
      Applying a custom behavior that overrides href="#" with href="javascript:;" fixes the problem.

      The problem occurred on Google Chrome and IE9 so far.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: