Closed Bug 1586107 Opened 6 years ago Closed 6 years ago

'url' type of input element does not accept relative URLs

Categories

(developer.mozilla.org Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chris, Assigned: cmills)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

Make an HTML page containing only...

<input type="url" />

Then type "example" in there.

Then click out.

Actual results:

Red border, indicating an error.

Expected results:

No red border, as it is a valid relative URL.
See Mozilla's own documentation https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url ("A single properly-formed relative URL." / "What is a URL?")

I can understand if the specs or consensus are only accepting absolute URLs - however in this case the documentation needs to be corrected.

Ah, living spec says...

"The input element represents a control for editing a single absolute URL given in the element's value."

So this is a docs issue.

Component: Untriaged → General
Product: Firefox → developer.mozilla.org
Version: 69 Branch → unspecified
Assignee: nobody → cmills
Flags: needinfo?(cmills)

Checked and verified! You are indeed correct.

I have updated the page as appropriate. Thanks for reporting.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(cmills)
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.