mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Make the hashtag typing experience slightly better
This commit is contained in:
parent
563a1ffd9b
commit
37f7c2a581
1 changed files with 5 additions and 2 deletions
|
@ -186,7 +186,7 @@ function Hashtags(props) {
|
|||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
const newHashtag = e.target[0].value;
|
||||
const newHashtag = e.target[0].value?.trim?.();
|
||||
// Use includes but need to be case insensitive
|
||||
if (
|
||||
newHashtag &&
|
||||
|
@ -212,8 +212,11 @@ function Hashtags(props) {
|
|||
reachLimit ? `Max ${TOTAL_TAGS_LIMIT} tags` : 'Add hashtag'
|
||||
}
|
||||
required
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck={false}
|
||||
// no spaces, no hashtags
|
||||
pattern="[^\s#]+"
|
||||
pattern="[^#][^\s#]+[^#]"
|
||||
disabled={reachLimit}
|
||||
/>
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue