Support

Account

Home Forums Bug Reports Color Picker Drag Updating Working Correctly

Solving

Color Picker Drag Updating Working Correctly

  • Hi Elliot,

    There seems to be an issue with the color picker. I haven’t dug into the code yet, here’s what’s happening.

    The color picker displays correctly and saves it’s data fine, but when you drag on the color picker area the color value is not updated. If you simply write in a new hex value manually the color picker will update and display the correct color. In addition, clicking on preset colors doesn’t work either.

    There are no Javascript errors except for this warning, but I think it is irrelevant:
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

    Let me know if you need any more help to make this troubleshat.

    Daniel

  • Just to confirm this bug is affecting me to: http://support.advancedcustomfields.com/forums/topic/color-picker-issue-on-the-latest-version/

  • Yay, I am not alone! Elliot, if you need any help with this let me know. I’ve had this issue occur when I changed the name of an HTML element and forgot to update the drag event in the colorpicker πŸ™‚ Judging from the quality of your code I’m guessing you don’t need my help πŸ™‚

    Daniel

    • Elliot

    • November 26, 2013 at 11:23 am

    Hi @danielpataki

    Thanks for the bug report. I’ll take a look at the code.

    I have a feeling that the code: event.returnValue is part of the WP color plugin, not ACF, but thanks anyway

    Cheers
    E

  • Hi Elliot,

    I think the conflict is in your script, perhaps they changed something with Iris in the last WordPress update. If you remove line 1203 from input.js $input.trigger('change'); then the color picker works as expected: I don’t know if this has any impact on anything else, but it may help you look further.

    event.returnValue is only used in wp-auth-check.js and jQuery itself so I don’t think this is a related issue.

    Daniel

    • Elliot

    • November 27, 2013 at 4:04 pm

    Hi @danielpataki

    Awesome, thanks for the code fix. I’ll have this fixed and released soon

    Thanks
    E

  • No worries, thanks for the fix!

    Daniel

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.