Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions com.woltlab.wcf/templates/shared_colorFormField.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
<span{if $field->getValue()} style="background-color: {$field->getValue()}"{/if}></span>
</span>
{else}
<a href="#" class="colorPickerButton jsTooltip" id="{$field->getPrefixedId()}_colorPickerButton" title="{lang}wcf.style.colorPicker.button.changeColor{/lang}" data-store="{$field->getPrefixedId()}">
<button
type="button"
class="colorPickerButton jsTooltip"
id="{$field->getPrefixedId()}_colorPickerButton"
title="{lang}wcf.style.colorPicker.button.changeColor{/lang}"
data-store="{$field->getPrefixedId()}"
>
<span{if $field->getValue()} style="background-color: {$field->getValue()}"{/if}></span>
</a>
</button>
<input type="hidden" {*
*}id="{$field->getPrefixedId()}" {*
*}name="{$field->getPrefixedId()}" {*
Expand Down
2 changes: 1 addition & 1 deletion ts/WoltLabSuite/Core/Ui/Color/Picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class UiColorPicker implements DialogCallbackObject {
this.oldColor!.style.backgroundColor = colorString;
this.input.value = colorString;

if (!(this.element instanceof HTMLButtonElement)) {
if (!(this.element instanceof HTMLButtonElement) || this.element.classList.contains("colorPickerButton")) {
const span = this.element.querySelector("span");
if (span) {
span.style.backgroundColor = colorString;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions wcfsetup/install/files/style/ui/colorPicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
}

.colorPickerButton {
height: 32px;
border-radius: var(--wcfBorderRadius);
height: 50px;
width: 50px;

> span {
height: 32px;
height: 50px;
}
}

Expand Down