Has anyone been able to enable showInput when using the color picker in a block?

Permalink
I am using a color picker in a block that I am making and have been unable to get showInput to work (all other options work). Having the ability to allow for text input would be extremely useful.

http://bgrins.github.io/spectrum/#options-showInput...

An example of trying to enable showInput:
$color = Core::make('helper/form/color');
$color->output('feedBackgroundColor', $feedBackgroundColor, array('showInput'=>'true','preferredFormat'=>'hex'));


I do know that showInput does work in concrete5. The color picker used in the Customize Theme section uses it.

Are the Customize Theme section color pickers different than the regular color pickers?

I found showInput being used here.
concrete\src\StyleCustomizer\Style\ColorStyle.php
print "<input type=\"text\" name=\"{$inputName}[color]\" value=\"{$color}\" id=\"ccm-colorpicker-{$inputName}\" />";
        print "<script type=\"text/javascript\">";
        print "$(function() { $('#ccm-colorpicker-{$inputName}').spectrum({
            showInput: true,
            showInitial: true,
            preferredFormat: 'rgb',
            allowEmpty: true,
            className: 'ccm-widget-colorpicker',
            showAlpha: true,
            value: " . $json->encode($color) . ",
            cancelText: " . $json->encode(t('Cancel')) . ",
            chooseText: " . $json->encode(t('Choose')) . ",
            clearText: " . $json->encode(t('Clear Color Selection')) . ",
            change: function() {ConcreteEvent.publish('StyleCustomizerControlUpdate');}
        });});";



Thank you

MrKDilkington
 
c5hub replied on at Permalink Reply
c5hub
Been around this loop several times ourselves but still not resolved it unfortuntaley. Prob be looking again come the new year so will post back if uncover anything useful. Totally agree that user input is pretty much essential - especially when you need to match a brands color scheme.
MrKDilkington replied on at Permalink Reply
MrKDilkington
It is good to know that I am not the only one experiencing this.
c5hub replied on at Permalink Reply
c5hub
After more testing of this - the actual input field does work.

Unfortunately the dialog box is interfering with it and preventing 'focus'. In Firebug I opened up the color picker in one of our blocks and removed the dialog completely and the input field works just fine.

Just need to understand now what is messing up the focus in the first place to try and come up with a fix. At least we are one step closer anyway ;)
MrKDilkington replied on at Permalink Reply
MrKDilkington
Have you posted to Github regarding this issue yet?
c5hub replied on at Permalink Reply
c5hub
Not yet - only just figured this out. I will do though today at some point.
c5hub replied on at Permalink Reply
c5hub
This has been submitted to GitHub and Andrew has marked as a bug and added it to the 5.7.4 milestone. If anyone else has anything else to offer on this one then the issue can be found and tracked here -https://github.com/concrete5/concrete5-5.7.0/issues/1777...
andrew replied on at Permalink Reply
andrew
Yeah, this is a low priority at the moment so we'd love to get some community help on this one.
c5hub replied on at Permalink Reply
c5hub
Andrew, my colleague has spent some time on this and has now submitted a pull request on GitHub that fixes this issue:

https://github.com/concrete5/concrete5-5.7.0/pull/1803...
MrKDilkington replied on at Permalink Reply
MrKDilkington
That is excellent.

Please tell your colleague thank you from me.