flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.27k stars 826 forks source link

Flarum ColorInput textbox issues #3858

Closed Ralkage closed 10 months ago

Ralkage commented 1 year ago

Current Behavior

The ColorInput textboxes in Flarum, more specifically in the Admin CP under "Appearance" and new/edit groups modal, are automatically completing the hex you put in even when you don't want it to. It seems to only happen when you input consecutive lowercase letters and numbers after the pound symbol. Also, when you try to backspace to input the correct hex, it'll keep adding back whatever letter or number sequence you attempted to delete during the process.

Steps to Reproduce

  1. Go into the Admin CP.
  2. Click on "Appearance".
  3. Under the "Colors" section, clear the first input textbox.
  4. Start typing a pound symbol followed by a sequence of numbers or lowercase letters such as #333 or #aaa.
  5. Hit backspace while at the end of the text input within the textbox.

Expected Behavior

The ColorInput textboxes in Flarum should not automatically complete the hex input text, especially when you want to add hex code that is non-sequential in letters or numbers.

Screenshots

https://github.com/flarum/framework/assets/2059356/760c8a60-1014-4962-b110-764a6979001b

Environment

Output of php flarum info

Flarum core: 1.8.1
PHP version: 8.1.10
MySQL version: 8.0.30
Loaded extensions: Core, bcmath, calendar, ctype, date, filter, hash, iconv, jso
n, SPL, pcre, readline, Reflection, session, standard, mysqlnd, tokenizer, zip,
zlib, libxml, dom, PDO, openssl, SimpleXML, xml, xmlreader, xmlwriter, curl, fil
einfo, gd, intl, mbstring, exif, mysqli, Phar, pdo_mysql, xsl
+----------------------+---------+--------+
| Flarum Extensions    |         |        |
+----------------------+---------+--------+
| ID                   | Version | Commit |
+----------------------+---------+--------+
| flarum-flags         | v1.8.0  |        |
| flarum-approval      | v1.8.0  |        |
| flarum-tags          | v1.8.0  |        |
| flarum-suspend       | v1.8.0  |        |
| flarum-subscriptions | v1.8.0  |        |
| flarum-sticky        | v1.8.0  |        |
| flarum-statistics    | v1.8.0  |        |
| flarum-mentions      | v1.8.2  |        |
| flarum-markdown      | v1.8.0  |        |
| flarum-lock          | v1.8.0  |        |
| flarum-likes         | v1.8.0  |        |
| flarum-lang-english  | v1.8.0  |        |
| flarum-emoji         | v1.8.0  |        |
| flarum-bbcode        | v1.8.0  |        |
+----------------------+---------+--------+
Base URL: https://flarumdev.test
Installation path: C:\laragon\www\flarumdev
Queue driver: sync
Session driver: file
Mail driver: mail
Debug mode: off

Possible Solution

N/A

Additional Context

Wasn't sure how to word the title, so if it doesn't make sense, feel free to edit it.