Closed Bug 1480115 Opened 6 years ago Closed 6 years ago

Edit and Resend: Cannot remove last character from request method textbox

Categories

(DevTools :: Netmonitor, defect, P3)

62 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1451494

People

(Reporter: nearwood, Assigned: glowka.tom)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180704003137

Steps to reproduce:

I used "https://bandcamp.com/api/account/1/my_bands", but any URL works.

Version: 62.0b13, I could also repeat this in 61.0.1.

1. Open Developer Tools, navigate to the network tab
2. Select a request and hit the "Edit and Resend" button
3. Try to delete all characters, to change it to "POST" for example




Actual results:

"GET" is repopulated in the textbox after the last character is removed.


Expected results:

The textfield should be left blank, at least while focused, to allow other request methods to be entered.

Also a combo box would be awesome.
Build ID 	20180704003137
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0

I was able to reproduce this bug. I can not remove the "GET" character.
Component: Untriaged → General
Product: Firefox → DevTools
I believe I found the source of the issue:

devtools/client/netmonitor/src/components/CustomRequestPanel.js:217

          input({
            className: "custom-method-value",
            id: "custom-method-value",
            onChange: (evt) =>
              this.updateCustomRequestFields(evt, request, updateRequest),
            value: method || "GET",
          }),

When you make `method` an empty string it is falsy and so returns "GET". Fixing this would require a bit more boldness than I anticipated for my first submission. There are also other event handlers for the other fields doing similar things.
When you select the entire "GET" text and replace it with a single "P", then you can finish typing "OST" and you will end up with "POST".

However, current Nightly 64.0a1 (2018-09-06) would still not allow me to "Edit and Resend" this particular request. Even when I do not change the method name, clicking on the "Send" button does not appear to be doing anything.

It is strange also because it works on many other requests that I have randomly tried. But for some reason, the GET request from the linked page "https://bandcamp.com/api/account/1/my_bands" seems to be "unrepeatable" by Firefox.
I can reproduce this issue. Thank you for filing it.
Moving to the right bugzilla component for further investigation and a fix.
Thank you for your patience.
Status: UNCONFIRMED → NEW
Component: General → Netmonitor
Ever confirmed: true
@Tom: This is very similar to the bug 1478361 you've fixed.
Do you think you could look at this one too?
Thanks!
Honza
Flags: needinfo?(glowka.tom)
Priority: -- → P3
Sure, I'll take it!
Assign it to me please.
Flags: needinfo?(glowka.tom) → needinfo?(odvarko)
Awesome, done!

Honza
Assignee: nobody → glowka.tom
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Hey Honza,
I wanted to get on with this issue, but it looks like solved. After investigating it a little bit I think it was https://bugzilla.mozilla.org/show_bug.cgi?id=1451494, which looks like 100% duplicate, that solved it.
Shall I just resolve it as duplicate or are there any other steps that I should take?
Flags: needinfo?(odvarko)
Apart from the main issue being resolved, the "previously-unrepeatable" GET request from "https://bandcamp.com/api/account/1/my_bands" can be repeated correctly in the current Nightly 65.0a1 (2018-11-26) (64-bit).
@Tom @pbaista: thanks for the update! I agree, this report can be closed.

Honza
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(odvarko)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.