Closed Bug 970172 Opened 10 years ago Closed 10 years ago

VariablesView doesn't correctly handle clicking while input is active

Categories

(DevTools :: Object Inspector, defect)

28 Branch
defect
Not set
normal

Tracking

(firefox27 unaffected, firefox28+ wontfix, firefox29+ fixed, firefox30+ fixed, firefox31 verified)

VERIFIED FIXED
Firefox 31
Tracking Status
firefox27 --- unaffected
firefox28 + wontfix
firefox29 + fixed
firefox30 + fixed
firefox31 --- verified

People

(Reporter: alice0775, Assigned: bbenvie)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

Steps To Reproduce:
1. Open Network Ctrl+Shift+Q
2. Open any web page
3. Select a request GET/PPOST
4. Select a header value of Request/Response(e.g. Referer)
   And Right click on value
5. Choose "Copy"

Actual Results:
Nothing is copied 

Expected Results:
Value should be copied
Keywords: regression
Version: Trunk → 28 Branch
Regression window(m-c)
Good:
http://hg.mozilla.org/mozilla-central/rev/4bf430d990e5
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131203071739
Bad:
http://hg.mozilla.org/mozilla-central/rev/85694fd9b17c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131203134611
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=4bf430d990e5&tochange=85694fd9b17c

Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/38ddf36afa9d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131203131247
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/8dfe4e73db8e
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131203144254
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=38ddf36afa9d&tochange=8dfe4e73db8e


Regression window(fx)
Good:
http://hg.mozilla.org/integration/fx-team/rev/7b8cc2b3568b
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131203094749
Bad:
http://hg.mozilla.org/integration/fx-team/rev/e0572cb4eb82
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131203101549
Pushlog:
http://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=7b8cc2b3568b&tochange=e0572cb4eb82

Regressed by
e0572cb4eb82	Brandon Benvie — Bug 808371 - Allow adding new properties to objects in the VariablesView. r=vp, r=jryans
Blocks: 808371
Summary: Copy contextmenu is available, but nothing is copied even if I choose "Copy" → Copy contextmenu is available, but nothing is copied when I choose "Copy"
Thanks for digging that out. Bug 808371 looks like the one changeset that makes most sense in that list.
Flags: needinfo?(bbenvie)
Looks like mousedown on the menu is causing it to close, so the click action (copy) never runs. Probably related to the changes from bug 808371 as victor said.
Flags: needinfo?(bbenvie)
QA Contact: bbenvie
Assignee: nobody → bbenvie
QA Contact: bbenvie
Attached patch variables-view-context.patch (obsolete) — Splinter Review
The problem was that we no longer check whether an input is active. Previously, we could detect whether we were editing by checking whether `variable._inputNode`. With bug 808371 that was no longer checked. This patch adds an "editing" property that serves this purpose.
Comment on attachment 8373794 [details] [diff] [review]
variables-view-context.patch

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

This looks perfectly good to me. Would it be possible to write a test for it?
Attachment #8373794 - Flags: feedback+
That's the plan! Bug 970961 has a better failure mode for testing fortunately. Dealing with context menus is icky.
Component: Developer Tools: Netmonitor → Developer Tools: Object Inspector
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: Copy contextmenu is available, but nothing is copied when I choose "Copy" → VariablesView doesn't handle clicking while input is active correctly
Summary: VariablesView doesn't handle clicking while input is active correctly → VariablesView doesn't correctly handle clicking while input is active
Attached patch variables-view-context.patch (obsolete) — Splinter Review
Adds a test. The test uses watch expression editing to confirm the behavior, but it also covers the contextmenu case (since the contextmenu counts as a child of the textbox, clicking on it has the same behavior as clicking on the textbox itself for our purposes).

https://tbpl.mozilla.org/?tree=Try&rev=b7c9c40905b7
Attachment #8373794 - Attachment is obsolete: true
Attachment #8374436 - Flags: review?(vporof)
Comment on attachment 8374436 [details] [diff] [review]
variables-view-context.patch

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

Some oranges here.
Attachment #8374436 - Flags: review?(vporof)
The use of EventUtils.synthesizeMouse in the new test appears to cause the failures in other completely unrelated tests.
Nothing I've tried besides synthesizeMouse actually triggers the behavior that needs to be tested here, as confirmed by the `input.selectionStart === input.selectionEnd` assertion.

With a vague handwavy thought process of "grumble grumble focus? something?", I added another synthesizeMouse click on the VariablesView container at the end of the test. This magically fixes the other test failures, but I don't understand why it works (or why it's needed).

https://tbpl.mozilla.org/?tree=Try&rev=788a2b24d4ac
Attachment #8374436 - Attachment is obsolete: true
I haven't given up on figuring it out yet! I do want to see if this fixes it on try though. In the previous try run, different platforms each failed at slightly different points. Locally, I was only able to reproduce failures for one of the tests.
Comment on attachment 8375166 [details] [diff] [review]
variables-view-context.patch

I've spent some time on this but haven't really come up with a good explanation of what the issue is here and why the extra synthesizeMouse fixes it. Do you have any ideas on how to debug this? If not, do you think we can land this as is? It fixes the bug and the behavior is tested...
Attachment #8375166 - Flags: feedback?(vporof)
Comment on attachment 8375166 [details] [diff] [review]
variables-view-context.patch

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

#yolo

::: browser/devtools/shared/widgets/VariablesView.jsm
@@ +2083,5 @@
>    delete: null,
>    new: null,
>    preventDisableOnChange: false,
>    preventDescriptorModifiers: false,
> +  editing: false,

Might want to make this a private property with a corresponding isEditing getter.
Attachment #8375166 - Flags: feedback?(vporof) → feedback+
We're building our final FF28 beta today so this is going to miss that release.  Please get in touch with release management if there's a serious potential user impact here, otherwise nominate any low-risk fix to branch uplift when ready.
Benvie, are you going to land this?
Flags: needinfo?(bbenvie)
Attachment #8375166 - Flags: feedback+ → review+
https://hg.mozilla.org/integration/fx-team/rev/7ea0df19bc37
Flags: needinfo?(bbenvie)
Whiteboard: [fixed-in-fx-team]
(In reply to Victor Porof [:vporof][:vp] from comment #17)
> Benvie, are you going to land this?

Totally fell off my radar... for reason I had it marked as landed.
https://hg.mozilla.org/mozilla-central/rev/7ea0df19bc37
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Reproduced in Nightly 2014-02-10, Win 7 x64.
Verified fixed 31.0a1 (2014-03-20).
Status: RESOLVED → VERIFIED
I see this is tracking both beta and australis. Should we get it uplifted?
Comment on attachment 8375166 [details] [diff] [review]
variables-view-context.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): new feature
User impact if declined: clicking won't work correctly in variablesview
Testing completed (on m-c, etc.):  m-c
Risk to taking this patch (and alternatives if risky): minimal risk.
String or IDL/UUID changes made by this patch: none.
Attachment #8375166 - Flags: approval-mozilla-beta?
Attachment #8375166 - Flags: approval-mozilla-aurora?
Attachment #8375166 - Flags: approval-mozilla-beta?
Attachment #8375166 - Flags: approval-mozilla-beta+
Attachment #8375166 - Flags: approval-mozilla-aurora?
Attachment #8375166 - Flags: approval-mozilla-aurora+
s/australis/aurora/
QA Whiteboard: [good first verify]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: