Shift + Home does not highlight value instead appends autocomplete value

RESOLVED FIXED in Firefox 40

Status

()

Firefox
Developer Tools: Inspector
P2
normal
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: tripad.mishra, Assigned: ednapiranha)

Tracking

(Blocks: 1 bug)

30 Branch
Firefox 40
x86_64
Windows 7
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox40 fixed)

Details

(Whiteboard: [polish-backlog][difficulty=easy])

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

4 years ago
Created attachment 8448915 [details]
Pressing Shift and Home

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

Shift + Home key on any property does not select(highlight) the value, instead it appends the default value from auto complete.

(See the attached GIF)



Expected results:

This is pretty frustrating as instead of the expect behavior of highlighting the whole value, it appends the default value and now you need to select the whole value again to erase it.

Updated

4 years ago
Component: Untriaged → Developer Tools: Inspector
Can confirm on OSX with fn+arrow.  This appends the selected portion of the autocomplete onto the end of the input.  Happens with fn+left/fn+right/fn+up/fn+down
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 831711
Whiteboard: [devedition-40]
Whiteboard: [devedition-40] → [devedition-40][difficulty=easy]
Jen, assigning to you as a potential polish bug.

Brian, since Jen is unfamiliar with this part of the codebase would you be available to mentor her here, or is someone else a better fit?
Assignee: nobody → jfong
Flags: needinfo?(bgrinstead)
Setting devedition-40 bugs to P2, filter on C17C996C-A0BE-4153-8057-FAB642D0746D
Priority: -- → P2
(In reply to J. Ryan Stinnett [:jryans] from comment #2)
> Brian, since Jen is unfamiliar with this part of the codebase would you be
> available to mentor her here, or is someone else a better fit?

Happy to, but I don't have much advice beyond the fact that you should start by looking at the _onKeyPress function in the inplace-editor file [0].  And, good luck!

[0]:  https://dxr.mozilla.org/mozilla-central/source/browser/devtools/shared/inplace-editor.js#856
Flags: needinfo?(bgrinstead)
Status: NEW → ASSIGNED
(Reporter)

Comment 5

3 years ago
Yay! Finally this is being looked into :D

Just wanted to add that
*Shift + End* also has a similar issues.

And i have verified this on multiple versions of Ubuntu also.
(In reply to Brian Grinstead [:bgrins] from comment #4)
> (In reply to J. Ryan Stinnett [:jryans] from comment #2)
> > Brian, since Jen is unfamiliar with this part of the codebase would you be
> > available to mentor her here, or is someone else a better fit?
> 
> Happy to, but I don't have much advice beyond the fact that you should start
> by looking at the _onKeyPress function in the inplace-editor file [0].  And,
> good luck!
> 
> [0]: 
> https://dxr.mozilla.org/mozilla-central/source/browser/devtools/shared/
> inplace-editor.js#856

My best guess is that End/Home are somehow being treated similar to arrow keys and finishing the value within the editor, but also not changing the selection range for some reason.  In the case of home/end (with or without shift) we should just leave the event alone and not do any special things - the default behavior of the <input> should be fine.
Duplicate of this bug: 1151331
(Assignee)

Comment 8

3 years ago
Unassigning myself for now until next week (hopefully).
Assignee: jfong → nobody
Status: ASSIGNED → NEW
(Assignee)

Updated

3 years ago
Assignee: nobody → jfong
(Assignee)

Comment 9

3 years ago
Created attachment 8595038 [details] [diff] [review]
Bug1032984.patch

This test is somewhat correct, but doesn't actually check the rule view - it checks any editable input (which works currently with the shift+home behavior on the inspector side, just not on the rule view side). Any idea how to specify the rule view property in this test?

Also let me know if the rest is more or less on the right track - thanks!
Attachment #8595038 - Flags: feedback?(bgrinstead)
Comment on attachment 8595038 [details] [diff] [review]
Bug1032984.patch

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

The fix seems good.  When trying to figure out exactly how to assert things in browser_inplace-editor, I realized that there is an easier test case to modify: styleinspector/test/browser_ruleview_completion-existing-property_01.js.

::: browser/devtools/shared/inplace-editor.js
@@ +881,5 @@
>      } else if (aEvent.altKey && !aEvent.shiftKey) {
>        increment *= smallIncrement;
>      }
>  
> +    // Default to highlighting text from the position of the cursor rather than

Nit: "Default to highlighting text from the position of the cursor" -> "Use default cursor movement"
Attachment #8595038 - Flags: feedback?(bgrinstead) → feedback+
Created attachment 8595060 [details] [diff] [review]
ruleview-failing-test-case.patch

Since I came up with this when trying to figure out what was going on, may as well share it
Status: NEW → ASSIGNED
Comment on attachment 8595038 [details] [diff] [review]
Bug1032984.patch

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

Also, on Mac fn+down and fn+up seem to cause the same problem.
(In reply to Brian Grinstead [:bgrins] from comment #12)
> Also, on Mac fn+down and fn+up seem to cause the same problem.

Which I believe maps to Page Up / Page Down
Comment on attachment 8595427 [details] [diff] [review]
Bug1032984.patch

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

Nice
Attachment #8595427 - Flags: review?(bgrinstead) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/ce1c811725e4
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [devedition-40][difficulty=easy] → [devedition-40][difficulty=easy][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/3ae82e9e39da
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Whiteboard: [devedition-40][difficulty=easy][fixed-in-fx-team] → [devedition-40][difficulty=easy]
Target Milestone: --- → Firefox 40

Updated

3 years ago
Duplicate of this bug: 1057223
See Also: → bug 1173604
Whiteboard: [devedition-40][difficulty=easy] → [polish-backlog][difficulty=easy]
You need to log in before you can comment on or make changes to this bug.