Skip to content

Commit

Permalink
fix manual color input
Browse files Browse the repository at this point in the history
  • Loading branch information
saboooor committed Jun 21, 2024
1 parent db2c3b8 commit 688c116
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routes/resources/animtab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ export default component$(() => {
}}
style={`background: ${color.hex};`}
value={color.hex}
onInput$={(e, el) => {
const picker = document.getElementById(`colorlist-color-${i + 1}-picker`)!;
picker.dataset.value = el.value;
picker.dispatchEvent(new Event('input'));
}}
onMouseUp$={() => {
const picker = document.getElementById(`colorlist-color-${i + 1}-picker`)!;
picker.dataset.value = color.hex;
Expand Down
5 changes: 5 additions & 0 deletions src/routes/resources/rgb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ export default component$(() => {
}}
style={`background: ${color.hex};`}
value={color.hex}
onInput$={(e, el) => {
const picker = document.getElementById(`colorlist-color-${i + 1}-picker`)!;
picker.dataset.value = el.value;
picker.dispatchEvent(new Event('input'));
}}
onMouseUp$={() => {
const picker = document.getElementById(`colorlist-color-${i + 1}-picker`)!;
picker.dataset.value = color.hex;
Expand Down

0 comments on commit 688c116

Please sign in to comment.