javascripthtmlasp.net-mvcrazor

Drag-and-drop action is being interpreted as a click, bypassing the confirmation dialog


We’ve got an EF6 MVC3 codeFirst-site. And recently i learned that if you click it, the confirm dialog works fine, but if you click and try to undo it by drag the link somewere and let go, you would assume that the click is cancelled. That works fine on my dev-environment but in production the link is really clicked, bypassing the confirmation dialog?

  <a href="@Url.Action("something","somecontroller")?listId=@Model.ListOfCLists[i].CListId" onclick="return confirm('Do you really want this?');" class="btn btn-xs menulink" download><span class="glyphicon glyphicon-cloud-download"></span> Download</a>

 

Here is another example, click-drag is not making a click on localhost, but in production it is interpreted as a click

@Html.ActionLink("Välj", "BuyTicket", new { ticketTypeID = 11 }, new { @onclick = "return confirm('Vill du använda 124 poäng?')", @class = "btn btn-primary btn-xs orange pull-right" })

Does anyone have any suggestions?


Solution

  • For some reason, the incorrect behavior stopped, so the error is fixed for now ;)