Attempting to delete questions on the mobile site on iOS causes two notification messages asking me to confirm the deletion, which it shouldn't do.
I haven't really looked into it, but it may just be thatI haven't really looked into it, but it may just be that the handlers from full.js and mobile.js are both being triggered, as there seems to be the flash of the error dialog indicating something went wrong on the supposed second AJAX request when the response from the first triggers a page reload.
You can see this happening by following the method calls; the mobile view first calls
StackExchange.question.init()
-> StackExchange.question.fullInit()
-> StackExchange.vote.init()
-> u()
...where u()
sets a delegated click handler on
$("div.post-menu *[id^='delete-post-'], table.flagged-posts *[id^='delete-post-']")
...that calls .preventDefault()
on the event, but doesn't block other handlers from firing.
It then later calls StackExchange.mobile.init()
, which in turn calls the method J()
that sets up a similar handler directly on $(".delete-post")
.
Since both handlers get triggered, there's two confirmation dialogs, and two attempts to delete the post. The extra handler in mobile.js seems unnecessary, so just removing it would appear to be the easy fix to the problem.