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

Use type=url for input (with novalidate) #943

Closed
bwbroersma opened this issue Apr 11, 2023 · 1 comment · Fixed by #971
Closed

Use type=url for input (with novalidate) #943

bwbroersma opened this issue Apr 11, 2023 · 1 comment · Fixed by #971
Assignees
Milestone

Comments

@bwbroersma
Copy link
Collaborator

bwbroersma commented Apr 11, 2023

To get a nice contextual keyboard on mobile devices¹, we could use <input type="url" in combination with <form novalidate>.

To test properly.

Bash one-liner to change the code base:

grep -RE 'form action="(https://internet.nl)?/(site|mail)/" method="POST"|type="text"' interface -l | xargs -n1 sed -r -i 's@(form action="(https://internet.nl)?/(site|mail)/" method="POST")@\1 novalidate@g;s/(type=)"text"/\1"url"/g'

Update: removed the CSS frontend path, since it doesn't need patching, input[type="url"] is already in the stylesheet:

.block input[type="url"],
.block input[type="text"] {
width: 100%;
}
.block input[type="email"],
.block input[type="url"],
.block input[type="text"] {


¹ e.g. types of iOS keyboards:
types of iOS keyboards

@bwbroersma bwbroersma self-assigned this Apr 11, 2023
bwbroersma added a commit to bwbroersma/Internet.nl that referenced this issue May 4, 2023
… novalidate

```bash
grep -RE 'form action="(https://internet.nl)?/(site|mail)/" method="POST"|type="text"' interface -l \
| xargs -n1 sed -r -i 's@(form action="(https://internet.nl)?/(site|mail)/" method="POST")@\1 novalidate@g;s/(type=)"text"/\1"url"/g'
```
@bwbroersma bwbroersma assigned mxsasha and unassigned bwbroersma May 4, 2023
@bwbroersma
Copy link
Collaborator Author

@mxsasha: I have a patch for this now, I would like to know what you think of making such a change.
It would need some extensive browser testing to be sure (note I also change the embed code).

mxsasha pushed a commit that referenced this issue Jun 6, 2023
```bash
grep -RE 'form action="(https://internet.nl)?/(site|mail)/" method="POST"|type="text"' interface -l \
| xargs -n1 sed -r -i 's@(form action="(https://internet.nl)?/(site|mail)/" method="POST")@\1 novalidate@g;s/(type=)"text"/\1"url"/g'
```
@bwbroersma bwbroersma added this to the v1.8 milestone Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants