fontawesome icons change on click when using with ckeditor-rails
Closed this issue · 1 comments
I am using fontawesome (4.4) in rails (4.2.3) (via the font-awesome-rails gem).
Upon clicking on any of the fontawesome icons in my rails app, the icon changes to an angle-right (and on repeated clicking, it toggles between angle-right and angle-down). I am not doing anything in my code or css to cause that change.
Update 1: I believe ckeditor-rails includes a version of fontawesome. Removing ckeditor-rails fixes the problem. How do I resolve the conflict? - see italicized lines below for more details
For example, if I have:
<%= link_to fa_icon 'fa-envelope lg', email_path %>
The initial html is:
<i class="fa fa-envelope fa-lg"></i>
After clicking once, it becomes:
<i class="fa fa-envelope fa-lg fa-angle-right"></i>
Clicking again makes it
<i class="fa fa-envelope fa-lg fa-angle-down"></i>
Clicking repeatedly beyond that toggles between angle-right
and angle-down
.
I have the following relevant gems (from Gemfile.lock):
bootstrap-sass (3.3.5.1)
font-awesome-rails (4.4.0.0)
rails (4.2.3)
sass (3.4.17)
sass-rails (5.0.3)
sprockets (3.3.3)
sprockets-rails (2.3.2)
ckeditor_rails (4.5.2)
Here is my full Gemfile.lock
Contributing guidelines checklist:
- ran bundle update and restarted server - DONE
- icon exists, since it does display before clicking the first time
- public/assets doesn't exist
- emptied cache
- touched application.scss
- Happens in dev and production
- Making sure that no other gem dependencies include outdated versions of the FontAwesome fonts. - I don't have bootswatch, which supposedly bundles an older version of fontawesome. I also have ckeditor-rails that bundles fontawesome for its toolbar. Removing it fixes the issue. How do I debug/workaround this issue?
- I use fa_icon everywhere
- results of
bundle list
here
This has nothing to do with font-awesome-rails.
You've got a snippet of javascript somewhere that's triggering this behavior. This is outside the scope of what a GitHub issue is meant for.