Bug 1791 - link navigation should be triggered by key-up not key-down and only if scrolling isn't triggered
: link navigation should be triggered by key-up not key-down and only if scroll...
Status: RESOLVED FIXED
Product: Browser
MicroB engine
: 3.2
: N800 Maemo
: Low normal (vote)
: 4.0
Assigned To: unassigned
: microb-bugs
: http://www.bloglines.com
:
:
:
  Show dependency tree
 
Reported: 2007-08-10 22:51 UTC by Thomas Morf
Modified: 2007-10-27 20:47 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Thomas Morf (reporter) 2007-08-10 22:51:17 UTC
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6)
Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (11; U Linux armv6; en-US; rv:1.9a6pre)
Gecko/20070810 Firefox3.0a1 Tablet browser_0.1.16 RX-34_2007.26-8

On the N800, when pressing the navigation buttons to scroll down on a Web page,
after any web page has finished loading, the first input field on the page will
be focused, instead of the page starting to scroll. If you press the navigation
button for a second time, the browser will start scrolling as expected. In case
the page already has focus on a input field after it is loaded (like yahoo or
google), the page will start scrolling. 

Reproducible: Always

Steps to Reproduce:
1. Go to www.economist.com.
2. Wait until page has finished loading.
3. Press the navigation button on the left side of the N800 and keep it pressed
down. 

Actual Results:  
The focus will jump to the first input field and not scroll.

Expected Results:  
Keeping the navigation button pressed, should always scroll up or down from the
position of the page at that moment. It would be more usable, if it worked
exactly like Opera version of the browser. 

This bug is preventing me from using Moz as my default browser. My personal
killer app on the N800 is Bloglines mobile (and I would bet for others too).
The input field is located at the bottom of the page. One hand navigation on
the go is hard when the page jumps to the bottom on the first touch of the
navigation button.
Comment 2 timeless 2007-08-19 01:08:07 UTC
are we supposed to be using keyup instead of keydown (to handle short presses)?
Comment 3 Frederic Crozat 2007-08-19 09:13:54 UTC
Yes, key release should be used for short press, instead of key press.
Comment 4 timeless 2007-08-20 17:30:44 UTC
OK. Tested w/ Opera on 770. Indeed, the behavior should be to trigger
navigation on release and only if it isn't replaced.

the simplest change is swapping up/down here:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/extensions/spatialnavigation/src/nsSpatialNavigation.cpp&rev=1.17&mark=72,84,86-315#71

(it's better to refactor the code so that up or down calls a function instead,
my js based impl did that.)

I don't know offhand where the magic is that decides whether to scroll or do
link navigation. That's probably somewhere else.
Comment 5 Oleg Romashin nokia 2007-09-16 17:03:32 UTC
Fixed 
Sending        patches/series.gtk2
Adding         patches/snav/BUG50934.spatial_scrolling.diff
Transmitting file data ..
Committed revision 697.