Support » Plugin: Advanced Custom Fields: Font Awesome Field » Bug when using tabs

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    Hi Steve thank you for reporting the issue you are seeing. Can you let me know which version of ACF you are running, and confirm that you are on the latest version of my plugin as well?

    In your screenshot, it looks like this is perhaps a repeater? Is this a repeater inside of a tab?

    Thread Starter Steve Jones

    (@stevejonesdev)

    I’m on the most recent versions of everything. See screenshot. The FontAwesome field is in a repeater under a tab on an options page. Hope that helps.

    https://www.dropbox.com/s/c57g1km9a13i8sy/Screenshot%202017-09-29%2013.11.33.png?dl=0

    I can verify this bug. I have ACF Pro 5.6.2 and Advanced Custom Fields: Font Awesome Field version 2.0.5.

    Issue only appears when using font-awesome field inside of repeater-field, which is inside of inactive tab. When user clicks to open the tab, it will tricker show_field js-action. The problem lies in row 54 of input-v5.js, which updates preview icon with the value of first select.fontawesome-edit.

    • This reply was modified 3 years, 7 months ago by saulirajala.
    Plugin Author Matt Keys

    (@mattkeys)

    Thanks guys, I have this fixed in version 2.0.6 but I am not done with QA yet. Hope to release soon!

    I putted this to my theme to fix issue for now:

    acf.add_action( 'show_field', function ( field, context ) {
            if ( 'tab' == context && field.children( '.acf-input' ).children( '.acf-fields' ).length > 0 ) {
              jQuery( '.icon_preview' ).each( function ( elem ) {
                var ValueOfSelect = jQuery( this ).siblings( 'select' ).val();
                jQuery( this ).children( 'i' ).removeClass();
                jQuery( this ).children( 'i' ).addClass( 'fa ' + ValueOfSelect );
              } );
            }
          } );

    This fix doesn’t work out of the box in the plugin itself, but I hope you can get some ideas for solution from my fix 🙂

    Oops! Sorry, I just noticed your previous answer. Thanks for the fix!

    Plugin Author Matt Keys

    (@mattkeys)

    Sorry for the delay. Just released v2.0.6 and this and some other similar issues should be fixed now. Let me know if you run into any further issues!

    Thanks,

    Matt

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bug when using tabs’ is closed to new replies.