Closed Bug 1430740 Opened 6 years ago Closed 6 years ago

Backspace in address bar doesn't work as expected for IP addresses

Categories

(Firefox :: Address Bar, defect)

57 Branch
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 719888

People

(Reporter: colin_mac2002, Unassigned)

Details

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

Steps to reproduce:

I frequently access web pages on devices using their IP address.  Those addresses are cached, just like any other entry in the address bar, so if I open a new tab and enter 19 then Firefox will auto-complete the rest of an IP address, giving me http://192.168.0.11/ in the address bar.

Sometimes I want a different device, e.g. 192.168.0.12.  At this point the cursor is sitting after the final / so logically I should press backspace twice to delete the '/' and the second '1' of the 11.  But this doesn't work.


Actual results:

When I press backspace in this situation, Firefox does not delete the forward slash at the end of the address.  Instead, it moves the cursor back and selects the forward slash.  So I then have to press backspace again to remove the forward slash, then backspace again to remove the digit 1.


Expected results:

If I want to delete two characters from a URL, I expect to press backspace twice.  Not three times.  It's a simple mechanism that has been familiar since computers first had keyboards, and it best not to play with these things.

This works OK for textual web addresses, e.g. if I have bbc.co.uk/ and press backspace twice then the / and the k disappear.  It seems to only be a problem if the address bar contains an IP address.
Possible duplicate of bug 719888.

(In reply to colin_mac2002 from comment #0)
> if I open a new tab and enter 19 then Firefox will auto-complete the rest of an
> IP address, giving me http://192.168.0.11/ in the address bar.
> 
> Sometimes I want a different device, e.g. 192.168.0.12.  At this point the
> cursor is sitting after the final /

How? In your scenario, typing 19 would result in the location bar showing 192.168.0.11/ with everything after 19 being selected. How do you get from there to the caret being on the right side of the slash?

Please provide proper steps to reproduce the issue.
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines#Writing_precise_steps_to_reproduce
Severity: normal → minor
Has Regression Range: --- → irrelevant
Has STR: --- → no
Component: Untriaged → Address Bar
Flags: needinfo?(colin_mac2002)
You're right, I missed a step.  After the address is auto-completed, click in the address bar's empty space to the right of the address.  The caret moves to the end of the address.  When I then press backspace the trailing forward slash is selected, rather than deleted.

If I press the right arrow after auto-complete then the caret is at the right hand end of the address, but pressing backspace works normally.
Flags: needinfo?(colin_mac2002)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
20180116220110

1. Visit an address like http://192.168.0.11/
2. Open a new tab.
3. Type 19 in the location bar.
4. Left-click on the right side of the address.
5. Press the Backspace key.

Actual results:
/ in the address is selected.

Expected results:
/ in the address is deleted.

(In reply to colin_mac2002 from comment #2)
> You're right, I missed a step.

Thanks. I couldn't reproduce the issue before, because it works properly when pressing Right Arrow.
Status: UNCONFIRMED → NEW
Has STR: no → yes
Ever confirmed: true
Is this limited to IP addresses? I can reproduce the issue using an address such as <https://bugzilla.mozilla.org/>.
Looks like it applies to regular URLs as well, I only found it on IP addresses because of the need to change the last digit or so on them.  Maybe someone can rename this case (remove 'for IP addresses') to reflect the wider scope.
Dupe of a quite old bug
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.