jquery-palette-color-picker icon indicating copy to clipboard operation
jquery-palette-color-picker copied to clipboard

When set_background = true, value of input doesn't update

Open technicalchops opened this issue 6 years ago • 0 comments

I'm on tablet so can't submit a pull request but I'd expect the value of the input to update along with the background colour if set_background is true. The current behaviour is that it only updates the background-color of the input.

LN 226

if( plugin.settings.set_background === false ) {
          $('[name="' + $button.attr('data-target') + '"]').val(name);
        } else {
          $('[name="' + $button.attr('data-target') + '"]').css({'background-color' : col});
        }

would become

if( plugin.settings.set_background === true ) {
          $('[name="' + $button.attr('data-target') + '"]').css({'background-color' : col});
        }
          $('[name="' + $button.attr('data-target') + '"]').val(name);

This may not be your intended behaviour of course, it's just what I expected to happen.

technicalchops avatar Mar 08 '18 23:03 technicalchops