kode-team / codemirror-colorpicker

colorpicker with codemirror
https://colorpicker.easylogic.studio/
MIT License
137 stars 13 forks source link

Changing hexcolor with existing alpha value will not replace full hexstring in editor #38

Closed Mooreel closed 4 years ago

Mooreel commented 4 years ago

Describe the bug In case of an existing 8 char hexcolor value in the editor containing the alpha value, changing the alpha value in the colorpicker leads to not fully replacing the hexstring in the editor but inserting it so that in the editor a 10 char invalid hexcolor code appears.

To Reproduce Steps to reproduce the behavior:

  1. Have a 8 char hexcode containing a two char alpha value in the editor
  2. click on the color picker square
  3. change alpha value
  4. leave color picker

Expected behavior Full hexstring in codemirror editor is replaced with string from color picker

Screenshots Editor 8char hex value image

color picker: change alpha value image

now editor has a 10 char hex value image

Desktop (please complete the following information):

Mooreel commented 4 years ago

Are issues in this repo looked at? If there is a pointer where this bug might come from I can try fixing it myself.

easylogic commented 4 years ago

hi @Mooreel Sorry to see the issue too late. I'll check the relevant code and tell you again.

easylogic commented 4 years ago

I fixed this issue.

you can use v1.9.70 .

please test it.

Mooreel commented 4 years ago

Thank you very much for the support @easylogic . That indeed fixed it.