Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow any input type #16

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion src/st_keyup/frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ function onRender(event) {

if (type == "password") {
input.type = "password"
}else if(type == "text"){
input.type = "text"
}
else {
input.type = "text"
input.type = type
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there particular other types you would like to support? I certainly don't want people passing type=radio, as that wouldn't make too much sense.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, the other input types I wanted to add were: "tel", "number" & "email".

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good -- would you mind updating this to explicitly allow that set of options, and update the python code to document what types are allowed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the doc string, and changed the css to support darkmode 😊

}

if (max_chars) {
Expand Down