Bug: Incorrect step deleted

lee5i3lee5i3 Posts: 48
edited July 29, 2013 1:56PM in Deployment Manager
I have 3 steps in my project.
I choose to delete step 3, it is actually deleting the first step!

And I think I see why...

Each step is in a form
<form id="delete">

And the "delete" button is doing
$('#delete').submit();
Looks like JQuery is choosing the first form since they all have the same id

Comments

  • I'm thinking it should be something like
    $(this).parent().submit();
    
  • csmithcsmith Posts: 138 Bronze 1
    Hi Lee,

    Thanks for the post - and your investigation! We are going to look at that asap, and will update this post when we know when the fix will be shipped.

    Best regards,
    Chris
    Divisional Development Lead
    Redgate Software
  • Hi Lee,

    Sorry!

    I've updated our JavaScript to use:
    $(this).parents('form').submit();
    

    Which is slightly different from yours -- it has the advantage that it'll continue working if we ever change the HTML to add a DIV in the DOM between the FORM and the A for example.

    Thanks for the bug report -- the fix should ship on Wednesday this week (all being well)...

    David
  • Sounds good, was more just giving an idea. :)

    Figure a bug report with a possible fix would be helpful.
Sign In or Register to comment.