-
Notifications
You must be signed in to change notification settings - Fork 1
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
Focusing on the input after adding category #116
Conversation
a46d602
to
bcb0570
Compare
<form method="POST" action="" class="add-category-form"> | ||
<input type="text" name="category" placeholder="New Category" required> | ||
<form method="POST" class="add-category-form"> | ||
<input type="text" name="category" placeholder="New Category" id="{{username}}category" required> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat unrelated question: what happens when username contains a "? Is it escaped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"
, not ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeroenDeDauw " and ' also work fine.
The backend HTML-building approach strikes again! |
bcb0570
to
c8fa684
Compare
Yeah. I wonder at what point it will force us to create separate Endpoints for POST. However, manipulating HTML with JS is also not very clean, but it is quite straightforward and doesn't require a lot of thinking. |
For: #114
It's a little tricky now because of our existing code and also the response we get from our POST request. It sends us the entire page. However, this script should get the job done; we can also put this JS in a separate file, although I don't see the reason to it at the moment. Please do test the code on the UI.
focus.mp4