WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#30537 closed defect (bug) (fixed)

Iris 1.0.6 resets color on drag when > 1 picker on page

Reported by: lilaeamedia Owned by: mattwiebe
Milestone: 4.1 Priority: high
Severity: major Version: 4.1
Component: External Libraries Keywords: has-patch
Focuses: ui Cc:

Description

Dragging the pointer in the square causes the color to return #000000.

I have seen it return #FFFFFF in another instance, but it always occurs when there are more than one pickers in the DOM and never on the first picker initialized.

Iris 1.0.6

Safari Version 8.0 (10600.1.25.1)
Chrome Version 39.0.2171.71 (64-bit)
Firefox 33.1

To reproduce, go to Appearance > Header (Twenty Fifteen in this example)
Select "Colors"

Under "Background Color", click "Select Color" and drag the pointer -> this works correctly.

Now under "Header and Sidebar Text Color" (or any other option) and drag the pointer -> color resets to #000000 and does not change.

Attachments (3)

example-for-customizer-#000.png (202.2 KB) - added by lilaeamedia 6 years ago.
This screenshot shows the example in this ticket, second picker active
example-in-plugin-#fff.png (177.9 KB) - added by lilaeamedia 6 years ago.
This screenshot shows the same issue (only resetting to #fff) in a plugin that uses the 'iris' enqueued script
iris-1.0.7.diff (43.7 KB) - added by mattwiebe 6 years ago.

Download all attachments as: .zip

Change History (6)

@lilaeamedia
6 years ago

This screenshot shows the example in this ticket, second picker active

@lilaeamedia
6 years ago

This screenshot shows the same issue (only resetting to #fff) in a plugin that uses the 'iris' enqueued script

#1 @ocean90
6 years ago

  • Component changed from Customize to External Libraries
  • Focuses ui javascript administration removed
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.1
  • Owner set to mattwiebe
  • Priority changed from normal to high
  • Severity changed from normal to major
  • Status changed from new to reviewing

Thanks for the ticket. I have created a PR upstream with an hotfix, see https://github.com/Automattic/Iris/pull/46.

Let's see if we can get a fix, otherwise I will revert [30551], see #30365.

@mattwiebe
6 years ago

#2 @mattwiebe
6 years ago

  • Focuses ui added
  • Keywords has-patch added; needs-patch removed

Ah, shoot. I'd forgotten to check for that use-case. Iris 1.0.7 fixes for multiple pickers.

#3 @ocean90
6 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 30650:

Update the Iris color picker to version 1.0.7.

Includes a fix for multiple pickers on the same page.
Changes: https://github.com/Automattic/Iris/compare/1.0.6...1.0.7

props mattwiebe.
fixes #30537.

Note: See TracTickets for help on using tickets.