This project is archived and is in readonly mode.

#6312 ✓stale
Tamer Salama

unobstructive Delete action links are not working in IE7

Reported by Tamer Salama | January 18th, 2011 @ 11:05 PM

  • Rails 3.0.1
  • IE 7.0.537x
  • Prototype version 1.7
  • Windows XP

The delete link actions are throwing "Error: Object doesn't support this property or method". The click is firing and forwarding the taking the user to the show page.


<a href="/controller/id" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Delete</a>

rails.js line 110 appears to be the cause

element.parentNode.insert(form);

untested fix: replacing the .insert(form) call with .appendChild(form) seems to work.

The appendChild() call was substituted with insert() in a recent commit:
https://github.com/rails/rails/commit/f61d923d284062b4e4864d81c6031...

Comments and changes to this ticket

  • Matthijs Langenberg

    Matthijs Langenberg January 21st, 2011 @ 09:56 AM

    • Tag changed from javascript, prototype.js, rails3.0.1, unobtrusive to javascript, prototype.js, rails3.0.1, rails3.0.3, unobtrusive

    I also ran into this issue.

    The problem is that element.parentNode is a DOM function, so it does not guarantee to return an element that is already extended by the Prototype library. It is better to use element.up(). So if you change line 110 from element.parentNode.insert(form) to element.up().insert(form), you are good to go.

    It seems to be solved at https://github.com/rails/prototype-ujs/commit/9d5aa75eee9b39818bddf... in a similar way.

    This is already fixed in the current master.

  • rails

    rails April 22nd, 2011 @ 01:00 AM

    • Tag changed from javascript, prototype.js, rails3.0.1, rails3.0.3, unobtrusive to javascript, prototypejs, rails301, rails303, unobtrusive
    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • rails

    rails April 22nd, 2011 @ 01:00 AM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages