问题
I'm using the font-awesome-rails
gem to show a css spinner when the submit button of a form_for
is clicked. The spinner works perfectly in Chrome and Firefox but doesn't appear in Safari. I'm on OSX El Capitan 10.11.15 and hosting on Heroku. I'm also using Bootstrap 3.
My submit button looks like this:
<%= f.submit "Save Changes", class: "btn btn-default", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> Saving Changes..."} %>
回答1:
I think your html is generated uncorrectly and there is nothing to do with Safari
<%= f.submit "Save Changes", class: "btn btn-default", 'data-disable-with' => "<i class='fa fa-spinner fa-spin'></i> Saving Changes...".html_safe %>
来源:https://stackoverflow.com/questions/38280473/font-awesome-rails-css-spinner-not-working-in-safari