mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Improve validation of editor's priority fields
prevent-invalid-input only applies to pattern matching, so ignore it. Instead, auto-validate and provide an error message, and widen the inputs so the message can be displayed fully.
This commit is contained in:
@@ -83,6 +83,10 @@ loot-editor-close
|
||||
iron-pages > *:not(.iron-selected) {
|
||||
display: none;
|
||||
}
|
||||
#priorityValue,
|
||||
#globalPriorityValue {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
/* Misc Styling. */
|
||||
paper-toolbar.medium-tall {
|
||||
@@ -139,11 +143,11 @@ loot-editor-close
|
||||
</div>
|
||||
<div>
|
||||
<div>Priority</div>
|
||||
<paper-input id="priorityValue" type="number" max="127" min="-127" step="1" prevent-invalid-input no-label-float></paper-input>
|
||||
<paper-input id="priorityValue" error-message="Must be an integer between +/- 127 inclusive" type="number" max="127" min="-127" step="1" auto-validate no-label-float></paper-input>
|
||||
</div>
|
||||
<div>
|
||||
<div>Global Priority</div>
|
||||
<paper-input id="globalPriorityValue" type="number" max="127" min="-127" step="1" prevent-invalid-input no-label-float></paper-input>
|
||||
<paper-input id="globalPriorityValue" error-message="Must be an integer between +/- 127 inclusive" type="number" max="127" min="-127" step="1" auto-validate no-label-float></paper-input>
|
||||
</div>
|
||||
</div>
|
||||
<div id="after">
|
||||
|
||||
Reference in New Issue
Block a user