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

  • 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

  • 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

  • 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)

The topic ‘Color Picker Drag Updating Working Correctly’ is closed to new replies.