Solr
  1. Solr
  2. SOLR-2455

admin/index.jsp double submit on IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2, 4.0-ALPHA
    • Component/s: None
    • Labels:
    • Environment:

      IE8

      Description

      /admin/index.jsp could issue a double submit on IE causing Jetty to error out.

      Here are the steps to reproduce on IE8 (only applies to IE8 on occasional basis, really more of an IE8 bug...):
      1. Open IE8
      2. Browse to http://localhost:8983/solr/admin
      3. Submit a query
      4. Displayed on Jetty log due to double submit:
      SEVERE: org.mortbay.jetty.EofException
      at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:791)

      This can be fixed easily by modifying index.jsp's javascript submit to return false:
      ... queryForm.submit(); return false; ...

      I will try to submit a patch for this easy fix, new to all this so please bear with me...

      1. SOLR-2455.patch
        1 kB
        Jeffrey Chang
      2. SOLR-2455.patch
        0.7 kB
        Jeffrey Chang

        Activity

        Hide
        Jeffrey Chang added a comment -

        Modified both index.jsp and form.jsp to return false upon JS submit.

        Show
        Jeffrey Chang added a comment - Modified both index.jsp and form.jsp to return false upon JS submit.
        Hide
        Uwe Schindler added a comment -

        Hi Jeffrey,

        thaks for the fix. This is really an issue and has nothing to do with Internet Explorer. The timing of the javascript calls in this browser just make it happen. In general: onclick handlers in javascript must return false to prevent the default action. This is true in all browsers. You can try this out with a simple web page link: <a href="gohere" onclick="window.alert('clicked'); return true;">..</a>. This link will first display the message box and then go to "gohere" (in all browsers!), versus <a href="gohere" onclick="window.alert('clicked'); return false;">..</a> will only display the message box.

        Another fix for this would be to simply remove form.submit() and explicitely return true.

        Show
        Uwe Schindler added a comment - Hi Jeffrey, thaks for the fix. This is really an issue and has nothing to do with Internet Explorer. The timing of the javascript calls in this browser just make it happen. In general: onclick handlers in javascript must return false to prevent the default action. This is true in all browsers. You can try this out with a simple web page link: <a href="gohere" onclick="window.alert('clicked'); return true;">..</a>. This link will first display the message box and then go to "gohere" (in all browsers!), versus <a href="gohere" onclick="window.alert('clicked'); return false;">..</a> will only display the message box. Another fix for this would be to simply remove form.submit() and explicitely return true.
        Hide
        Uwe Schindler added a comment -

        Committed trunk revision 1089335, branch 3.x revision 1089340

        I will keep this open for possible backport to 3.1.1

        Show
        Uwe Schindler added a comment - Committed trunk revision 1089335, branch 3.x revision 1089340 I will keep this open for possible backport to 3.1.1
        Hide
        Robert Muir added a comment -

        Bulk move 3.2 -> 3.3

        Show
        Robert Muir added a comment - Bulk move 3.2 -> 3.3
        Hide
        Jeffrey Chang added a comment -

        Sorry; I hit close by accident.

        Show
        Jeffrey Chang added a comment - Sorry; I hit close by accident.
        Hide
        Uwe Schindler added a comment -

        This can be closed, we will not backport to 3.1.1

        Show
        Uwe Schindler added a comment - This can be closed, we will not backport to 3.1.1

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Jeffrey Chang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development