Skip to content

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

Description

@bwbroersma

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

Activity

  1. added
    enhancementIssues that suggest slight improvements to existing code, tests, etc.
    on Apr 11, 2023
  2. self-assigned this
    on Apr 11, 2023
  3. added a commit that references this issue on May 4, 2023
    ca274c0
  4. bwbroersma commented on May 4, 2023

    @bwbroersma
    CollaboratorAuthor

    @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).

  5. added a commit that references this issue on Jun 6, 2023
    5d742e3
  6. added this to the v1.8 milestone on Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementIssues that suggest slight improvements to existing code, tests, etc.

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions