Open Bug 1798686 Opened 2 years ago Updated 1 year ago

Custom colors are not applied

Categories

(Core :: Layout: Form Controls, defect)

Desktop
Windows
defect

Tracking

()

Tracking Status
firefox-esr102 --- unaffected
firefox106 --- affected
firefox107 --- affected
firefox108 --- affected

People

(Reporter: phorea, Unassigned)

Details

(Whiteboard: [pdfjs-ux])

Attachments

(1 file)

Attached image 2022-11-02_12h39_12.gif

Note

  • This issue only affects the Custom Colors panel when first interacting with it, the Basic colors one works fine

Found in

  • Firefox 107 beta 8

Affected versions

  • Firefox 106.0.3
  • Firefox 107 beta 8
  • latest Nightly 108.a01 2022-11-02

Tested platforms

  • Affected platforms: Windows 10x64
  • Unaffected platforms: macOS 11, Ubuntu 22.04

Steps to reproduce

  1. Open a random PDF and select the Draw or the Text tools from the PDF toolbar.
  2. Click on the Color button from the panel (black by default)
  3. Color window opens with Basic, Custom and Mix color areas (Define custom colors)
  4. Drag the mouse in the Mix color area (from the right) in order to modify the default color
  5. Select Add to Custom Colors button
  6. Select the "OK" button and start drawing with the selected color

Expected result
4. Color|Solid is modified accordingly
5. Selected color is added to the Custom Colors section
6. Drawing is made with the previously defined color

Actual result

  • Color|Solid stays Black and color is not changed.
  • Custom color is applied after interacting with a basic color.

Regression range

  • Not a regression, reproduces since this feature entered Firefox.
Has STR: --- → yes

PDF.js is just using the default HTML color picker which is platform-dependent, so it isn't really a pdf.js bug.
But for sure we can try to propose a better UI/UX to choose a color.

Type: defect → enhancement
Whiteboard: [pdfjs-ux]

Can you also reproduce this bug with the buttons from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color?

Flags: needinfo?(phorea)

(In reply to Marco Castelluccio [:marco] from comment #2)

Can you also reproduce this bug with the buttons from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color?

The buttons from this MDN page are not reproducing the issue described in comment#0, using latest Nightly 115.0a1, Win 10 64-bit.

Flags: needinfo?(phorea)

On the MDN page a color with a non-null luminance is preselected when in pdf.js, by default the color is black hence the default luminance is 0.
So the problem is with the Windows color picker.

Type: enhancement → defect
Component: PDF Viewer → Layout: Form Controls
Product: Firefox → Core
Summary: Custom colors are not applied for Draw and Text tools in PDF files → Custom colors are not applied
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: