Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

rails/jquery-ujs links broken in IE; patch attached

#4108

This ticket is for rails/jquery-ujs [ http://github.com/rails/jquery-ujs ]

Unobtrusive javascript links with jquery don't work in Internet Explorer (tested on version 8).

When jquery-ujs attempts to append the form responsible for handling data-method links the form is not properly closed. It works under FF, and Safari/Chrome, not on IE.

Changing line 89 from:

form = $('<form method="post" action="'+href+'">'),

to:

form = $('<form method="post" action="'+href+'" />'),

Resolves the problem.

Patch attached.

Reported by dcgrigsby · March 4th, 2010 @ 07:14 PM

State: resolved
Milestone: none
Assigned to: Ryan Bigg Ryan Bigg
Importance: Low

Activity

  1. dcgrigsby
    dcgrigsby
    • Tag changed from ujs jquery jquery-ujs to jquery, jquery-ujs, ujs

    March 4th, 2010 @ 07:17 PM

  2. Rolf Bjaanes
    Rolf Bjaanes

    This should be fixed, but it shouldn't say


    form = $('<form method="post" action="'+href+'" />')

    rather


    form = $('<form method="post" action="'+href+'">')

    to be HTML 5 compliant.

    April 13th, 2010 @ 03:17 PM

  3. Rolf Bjaanes
    Rolf Bjaanes

    That should be :


    form = $('<form method="post" action="'+href+'"></form>')

    to be HTML 5 compliant. :)

    April 13th, 2010 @ 03:19 PM

  4. Steve St. Martin
    Steve St. Martin
    • Tag changed from jquery, jquery-ujs, ujs to jquery, jquery-ujs, resolved, ujs

    April 13th, 2010 @ 04:12 PM

  5. Steve St. Martin
    Steve St. Martin
    • Assigned user set to Ryan Bigg

    April 15th, 2010 @ 02:41 PM

  6. Ryan Bigg
    Ryan Bigg
    • State changed from new to resolved

    Fixed as mentioned by Steve.

    April 15th, 2010 @ 02:43 PM