Deleting non-existing URL query parameters should remove ?

RESOLVED FIXED in Firefox 56

Status

()

Core
DOM
P2
normal
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: annevk, Assigned: baku)

Tracking

unspecified
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Rather surprising, but I guess there is some reason.
(Reporter)

Comment 2

6 months ago
We could change the standard instead (someone suggested as much at https://github.com/whatwg/url/issues/332), but it's always been this way. It's just that until now nobody found this bug in Chrome and Firefox (Safari implements the standard).
Priority: -- → P2
(Reporter)

Comment 3

6 months ago
We ended up changing the standard instead, but Firefox still has a test failure as delete("non-existing-key") is a no-op, but it shouldn't be (sort() does end up updating so it seems like it's just an inconsistency).
Summary: Deleting URL query parameters should not remove ? → Deleting non-existing URL query parameters should remove ?
(Assignee)

Comment 4

6 months ago
Created attachment 8887067 [details] [diff] [review]
urlsearchparams.patch
Assignee: nobody → amarchesini
Attachment #8887067 - Flags: review?(kyle)
Comment on attachment 8887067 [details] [diff] [review]
urlsearchparams.patch

Review of attachment 8887067 [details] [diff] [review]:
-----------------------------------------------------------------

No commit message?
Attachment #8887067 - Flags: review?(kyle) → review-
(Assignee)

Comment 6

6 months ago
Created attachment 8887808 [details] [diff] [review]
urlsearchparams.patch
Attachment #8887067 - Attachment is obsolete: true
Attachment #8887808 - Flags: review?(kyle)

Comment 7

6 months ago
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/78ea9fac3a58
Deleting non-existing URL query parameters should remove ?, r=qdot

Comment 8

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/78ea9fac3a58
Status: NEW → RESOLVED
Last Resolved: 6 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.