groups: restrict sigil color input to 6 hex chars

This commit is contained in:
Matilde Park 2020-04-21 14:56:45 -04:00
parent 99875b2f45
commit 68961c484c

View File

@ -367,7 +367,9 @@ export class ContactCard extends Component {
onChange={this.sigilColorSet}
defaultValue={defaultColor}
key={"default" + defaultColor}
onKeyPress={ e => !e.key.match(/[0-9a-f]/i) ? e.preventDefault() : null}
onBlur={(() => this.setField("color"))}
maxLength={6}
style={{
resize: "none",
height: 40,