Closed Bug 1489874 Opened 6 years ago Closed 5 years ago

When submitting a content blocking issue report, pressing the left arrow (e.g. to fix a typo) exits the report and loses everything that was typed

Categories

(Firefox :: Site Identity, defect, P3)

64 Branch
x86_64
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: cconover, Unassigned)

References

Details

(Whiteboard: [anti-tracking])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:64.0) Gecko/20100101 Firefox/64.0
Build ID: 20180907100116

Steps to reproduce:

Mac: 10.13.6, FF 64.0a1

Go to a site where Content Tracking is enabled:
   https://www.politico.com/story/2018/09/09/pence-obama-trump-midterms-812655

Click on Content Tracking icon (i) -> Report a Problem, start typing, use back arrow.


Actual results:

Typing some text, then the back arrow (to correct a typo) clobbers entire form, forcing you to start again.  This is frustrating enough that I have given up on submitting site problems.


Expected results:

Back arrow should be left as back arrow, allowing you to edit text and not used as back navigation.
Component: Untriaged → Tracking Protection
Blocks: tp-breakage
Priority: -- → P3
Whiteboard: tp-needsrepro
I was able to reproduce the issue. Moving this issue to Tech Evangelism for further investigation.

[Tested with:]
Browser / Version: Firefox Nightly 64.0a1 (2018-09-11)
Operating System: Windows 10 Pro

@Mike can you have a look on this?
Component: Tracking Protection → Desktop
Flags: needinfo?(miket)
OS: Unspecified → Mac OS X
Product: Firefox → Tech Evangelism
Hardware: Unspecified → x86_64
Whiteboard: tp-needsrepro → [needsdiagnosis]
Version: 64 Branch → Firefox 64
Attached image BackArrowDismiss.gif
Attached gif with the issue.
Thanks for the report! 

Johann, this seems like something on your end to tackle.
Blocks: 1474238
Status: UNCONFIRMED → NEW
Component: Desktop → Tracking Protection
Ever confirmed: true
Flags: needinfo?(miket) → needinfo?(jhofmann)
Product: Tech Evangelism → Firefox
Version: Firefox 64 → 64 Branch
No longer blocks: tp-breakage
Yeah!
Flags: needinfo?(jhofmann)
Whiteboard: [needsdiagnosis] → [privacy-panel-64][triage]
Component: Tracking Protection → Site Identity and Permission Panels
Summary: Mac FF Nightly 64.0a1: Content Tracking bug site issue form resets with back arrow (annoying, almost unusable) → When submitting a content blocking issue report, pressing the left arrow (e.g. to fix a typo) exits the report and loses everything that was typed
Would be great to get this into 64 if there are cycles.
Whiteboard: [privacy-panel-64][triage] → [privacy-panel]
Assignee: nobody → prathikshaprasadsuman
Status: NEW → ASSIGNED
Whiteboard: [privacy-panel] → [privacy65]
Flags: needinfo?(jhofmann)

There is a deeper issue around not being able to move the cursor in text areas, namely bug 187083. I don't expect us to solve this.

We can, however, solve the issue of navigating with the arrow-keys in this panel. The code that is doing this lives here: https://searchfox.org/mozilla-central/rev/b10ae6b7a50d176a813900cbe9dc18c85acd604b/browser/components/customizableui/PanelMultiView.jsm#1566

In this context, this.node will refer to this element https://searchfox.org/mozilla-central/rev/b10ae6b7a50d176a813900cbe9dc18c85acd604b/browser/components/controlcenter/content/panel.inc.xul#317

It would be great if we could add an attribute to that element specifying that we don't want to enable navigation via back and forward keys, such as backforwardkeynavigation=false.

Then the above mentioned code would need to check that attribute and stop navigation.

Assignee: prathikshaprasadsuman → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(jhofmann)
Whiteboard: [privacy65] → [anti-tracking]
Assignee: nobody → danielleleb12
Status: NEW → ASSIGNED

Having added the backforwardkeynavigation="false" on line 320 of the panel.inc.xul, is the best way to check the attribute by doing this:

      case "ArrowLeft":
      case "ArrowRight": {
        stop();
        if (this.node.getAttribute("backforwardkeynavigation") && 
            ((!this.window.RTL_UI && keyCode == "ArrowLeft") ||
            (this.window.RTL_UI && keyCode == "ArrowRight"))) {
          this.node.panelMultiView.goBack();
          break;
        }
        // If the current button is _not_ one that points to a subview, pressing
        // the arrow key shouldn't do anything.
        let button = this.selectedElement;
        if (!button || !button.classList.contains("subviewbutton-nav")) {
          break;
        }
        // Fall-through...
      }

Or should I be checking it a different way/somewhere else?

Hey, I'm really sorry, it turns out that I think we will end up fixing this issue in bug 1522092. So there's probably no patch required here. It doesn't happen very often that two bugs collide, and I apologize for putting you onto this. Be sure that your effort was noted.

Can I just re-route you to work on bug 1501955 instead?

Thank you!

Depends on: 1522092

Hey, no problem at all! It was interesting to take a look at the bug anyway.

I'll start working on the other bug instead.

Thanks!

Bug 1522092 did fix this, but it also caused other problems. I'm going to address this properly in bug 1477673.

Depends on: 1477673

Let's keep this open for tracking then?

Assignee: danielleleb12 → nobody
Status: ASSIGNED → NEW

Seems to be fixed after bug 1477673 has landed.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: