Results 1 to 3 of 3

Thread: Color picker doesn't react well to material label

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default Color picker doesn't react well to material label

    Test case:

    https://fiddle.sencha.com/#view/editor&fiddle/2qsd

    Run the test case. Note that the label and value overlap each other.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    Seems like the right fix would be to call setInputValue. Barely any testing done, YMMV.

    Code:
    Ext.define(null, {
        override: 'Ext.ux.colorpick.Field',
    
        updateValue: function(color) {
            const swatchEl = this.element.down('.x-colorpicker-field-swatch-inner');
    
            // If the "value" is changed, update "color" as well. Since these are always
            // tracking each other, we guard against the case where we are being updated
            // *because* "color" is being set.
            if (!this.syncing) {
                this.syncing = true;
                this.setColor(color);
                this.syncing = false;
            }
    
            const c = this.getColor();
            Ext.ux.colorpick.ColorUtils.setBackground(swatchEl, c);
    
            const picker = this.colorPicker;
            if (picker) {
                picker.setColor(c);
            }
    
            this.setInputValue(this.getValue());
        }
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    567

    Default

    Hello Evan,

    This issue has been registered in our bug tracker, the reference Jira EXTJS-28215 will be linked to this thread for you to receive updates on the progress.

    Regards,
    Kumar
    Sencha Support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •