问题
When you use data-confirm
on framework7 embedded in rails, a double prompt is observed. The first prompt is coming from Rails. The other is coming from framework7.
<div class="swipeout-actions-right">
<a id="more_button" href="#" data-task-id={{id}} class="demo-actions">
<span class="small">More</span>
</a>
<a id="archive_button" href="#" data-task-id={{id}} class="bg-blue demo-actions">
<span class="small">Archive</span></a>
<a href="#" class="bg-green swipeout-delete swipeout-overswipe" data-confirm="Are you sure want to delete this item?">
<span class="small">Complete</span>
</a></div>
Does anyone has a recommended solution to the double prompt of data-confirm
this?
回答1:
Update: I fix it by disabling rails.confirm
$.rails.confirm = function(){return true}
You can also fix the issue by removing //= require jquery_ujs
.
来源:https://stackoverflow.com/questions/45433422/double-data-confirm-prompt-observed-on-rails-with-framework7