Closed Bug 631473 Opened 9 years ago Closed 7 years ago

Don't consume mouse scroll events outside arrow panels on OS X

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: dana, Assigned: fryn)

References

Details

(Keywords: ux-mode-error, ux-userfeedback, Whiteboard: [doorhanger])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10) Gecko/20100101 Firefox/4.0b10
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10) Gecko/20100101 Firefox/4.0b10

I hope this isn't a duplicate. A lot of the door-hanger bugs use jargon that i am unfamiliar with, so it's possible that it is. Sorry in advance if so

In any case, as the title states, i am unable to scroll Web pages when door-hanger notifications (add-on downloading, geolocation request, &c.) are present in the UI. To word it another way, the door-hangers appear to be semi-modal — although they go away when clicked outside of, they are blocking other input just like a modal sheet would.

Reproducible: Always

Steps to Reproduce:
1. Visit a site that produces a door-hanger notification. For instance, go to AMO and try to install an extension. After accepting the download thing, a door-hanger will appear saying that the extension will be installed upon restart.

2. Attempt to scroll the page you are on.
Actual Results:  
Scrolling is impossible until you first click somewhere on the page to dismiss the door-hanger.

Expected Results:  
Scrolling should not dismiss the door-hanger, but it should still function.

In searching for previous bugs about this, i located Bug 597723, which may be related. It seems that scrolling was causing the door-hanger to be dismissed, so they changed it so that this would not happen. I agree that it should not be dismissed, but you should still be able to scroll.

Given how OS X scrolling works in general (it should ALWAYS be possible unless a modal sheet is present), and the huge number of uses the door-hanger notifications will be seeing in FF4, i think this is a semi-major usability flaw.
(In reply to comment #0)
> Given how OS X scrolling works in general (it should ALWAYS be possible unless
> a modal sheet is present)

Or unless a context menu is present. The problem here is that we treat the panel like a context menu.

Here's the responsible code in nsChildView.mm, in case anybody is interested in fixing this:

  // check to see if scroll events should roll up the popup
  if ([theEvent type] == NSScrollWheel) {
    gRollupListener->ShouldRollupOnMouseWheelEvent(&shouldRollup);
    // always consume scroll events that aren't over the popup
    consumeEvent = YES;
  }
Blocks: 597723
Status: UNCONFIRMED → NEW
Component: General → Widget: Cocoa
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → cocoa
Hardware: x86_64 → All
Version: unspecified → Trunk
Whiteboard: [doorhanger]
this is a problem on Linux too.
Summary: Unable to scroll when doorhanger notification is present → Don't consume mouse scroll events outside arrow panels
Attached patch patchSplinter Review
In case there is concern about external consistency with the platform, in both Safari and Chrome on OS X, mouse scroll events are not consumed outside panels when panels are open. See Safari's downloads panel, etc.

Unlike button menus and context menus, arrow panels were not designed to be modal, as they are often opened without direct user input.
Assignee: nobody → fyan
Status: NEW → ASSIGNED
Attachment #722574 - Flags: review?(mstange)
Comment on attachment 722574 [details] [diff] [review]
patch

(In reply to Frank Yan (:fryn) from comment #3)
> In case there is concern about external consistency with the platform, in
> both Safari and Chrome on OS X, mouse scroll events are not consumed outside
> panels when panels are open. See Safari's downloads panel, etc.
> 
> Unlike button menus and context menus, arrow panels were not designed to be
> modal, as they are often opened without direct user input.

Indeed.
Attachment #722574 - Flags: ui-review+
Attachment #722574 - Flags: review?(mstange)
Attachment #722574 - Flags: review?(enndeakin)
Attachment #722574 - Flags: review+
Comment on attachment 722574 [details] [diff] [review]
patch


>+  nsIContent* content = item->Frame()->GetContent();
>+  if (content->NodeInfo()->Equals(nsGkAtoms::panel, kNameSpaceID_XUL) &&

This should use:

item->PopupType() == ePopupTypePanel

to check if the item is a panel.

There should also be a bug for support on other platforms, as comment 2 seems to suggest.
Attachment #722574 - Flags: review?(enndeakin) → review+
Thanks for the reviews, Markus and Neil!

https://hg.mozilla.org/integration/mozilla-inbound/rev/9a9d1528a3e7

I will file the bug for other platforms shortly.
Summary: Don't consume mouse scroll events outside arrow panels → Don't consume mouse scroll events outside arrow panels on OS X
Target Milestone: --- → mozilla22
Blocks: 849544
https://hg.mozilla.org/mozilla-central/rev/9a9d1528a3e7
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Blocks: 982121
Depends on: 1265308
You need to log in before you can comment on or make changes to this bug.