Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#6359 closed defect (fixed)

[patch] toolbar: (FF3) keyboard use of FilteringSelect scrolls window to hug current selection

Reported by: davidb Owned by: haysmark
Priority: high Milestone: 1.1.1
Component: Dijit - Form Version: 1.1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by davidb)

In FF3:

  1. Open http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Editor.html
  2. Put keyboard focus on 3rd toolbar
    1. Shift-tab when focus is in edit window
  3. arrow to font combo box
  4. use down and up arrows

expected: move selection

actual: move selection + scroll window to hug selection

Attachments (1)

6359.patch (931 bytes) - added by haysmark 12 years ago.
Fixes #6359. Remove bugged native call to scrollIntoView. All browsers now calculate scrolling into view in the same way.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 12 years ago by davidb

Note: peller mentioned we use a FilteringSelect? in the FontChoice? plugin. Might be a place to connect some code to stop the event...

comment:2 Changed 12 years ago by davidb

Component: EditorDijit
Owner: changed from liucougar to davidb
Status: newassigned
Summary: editor: stray keyboard events scroll windowtoolbar: stray keyboard events scroll window

comment:3 Changed 12 years ago by davidb

The ComboBoxMixin? seems to call stopEvent properly. Perhaps dojo.stopEvent is simply failing in FF3?

comment:4 Changed 12 years ago by davidb

dojo.stopEvent is working for me in FF3 in other tests. I can see that it is being called in the described case as well, so I'm not sure why the content scrolls.

comment:5 Changed 12 years ago by davidb

Summary: toolbar: stray keyboard events scroll windowtoolbar: keyboard use of FilteringSelect scrolls window to hug current selection

I'm no longer convinced this is a stray key event problem. Changing description.

comment:6 Changed 12 years ago by davidb

Description: modified (diff)
Owner: davidb deleted
Status: assignednew
Summary: toolbar: keyboard use of FilteringSelect scrolls window to hug current selectiontoolbar: (FF3) keyboard use of FilteringSelect scrolls window to hug current selection

comment:7 Changed 12 years ago by davidb

Description: modified (diff)

comment:8 Changed 12 years ago by liucougar

it may related to timing: try to move the stopEvent as early as possible in the event handler, it may just fix it

comment:9 Changed 12 years ago by bill

Owner: set to Douglas Hays

Doug, can you or Mark handle this one?

comment:10 Changed 12 years ago by Douglas Hays

Owner: changed from Douglas Hays to haysmark

comment:11 Changed 12 years ago by haysmark

Status: newassigned

The event is being stopped.

The problem is that the dijit.scrollIntoView calls in the ComboBox? menu are not working in FF3. Here is what happens:

  1. We call dijit.scrollIntoView
  2. dijit.scrollIntoView gives Mozilla special treatment and calls native scrollIntoView(false) on the menu item
  3. If the menu item's parent (the menu) has a scrollbar, then everything works great
  4. If the menu does not have a scrollbar, as is this case, then FF3 looks for the next ancestor and scrolls it. dijit.popup attaches the menu to the body so the whole window scrolls.

My solution: stop giving Mozilla special treatment! I will attach a patch for dijit/_base/scroll.js that fixes the problem for me.

Changed 12 years ago by haysmark

Attachment: 6359.patch added

Fixes #6359. Remove bugged native call to scrollIntoView. All browsers now calculate scrolling into view in the same way.

comment:12 Changed 12 years ago by haysmark

Summary: toolbar: (FF3) keyboard use of FilteringSelect scrolls window to hug current selection[patch] toolbar: (FF3) keyboard use of FilteringSelect scrolls window to hug current selection

comment:13 Changed 12 years ago by Douglas Hays

(In [13319]) References #6359 (1.1.1). Remove native scrollIntoView for Mozilla

comment:14 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [13320]) Fixes #6359 for 1.2. Remove native scrollIntoView() call for Mozilla.

comment:15 Changed 12 years ago by dylan

Please verify that we didn't break things for FF2 users with this change.

comment:16 Changed 12 years ago by haysmark

Works for me.

comment:17 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.