[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: key navigation and visible area of the page
From:       Lubos Lunak <l.lunak () suse ! cz>
Date:       2004-05-18 8:17:03
Message-ID: 200405181017.03742.l.lunak () suse ! cz
[Download RAW message or body]

On Monday 17 of May 2004 20:59, Tobias Anton wrote:
> On Montag, 17. Mai 2004 17:19, Lubos Lunak wrote:
> >  I already described the problem. The Tab behaviour is weird if the
> > focused item is not visible. Go e.g. to
> > http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/khtml/khtmlview.cpp ,
> > hit Tab few times, scroll ten pages down, and start hitting Tab again. I
> > doubt you can guess what it will do, but even if you do, I don't consider
> > that to be known behaviour, in fact I was pretty confused when that
> > happened to me.
>
> I admit that mixing keyboard and mouse navigation does not work well.

 No mouse navigation involved, that "scroll ten pages down" was 10xPageDown.

> >  But perhaps this problem would go away after changing Tab to start from
> > the visible area, like Arend suggested. What's your opinion on this?
>
> I consider it a good idea. This behaviour is already implemented, but it is
> only active if there's no currently focused node. If you have a look at
> khtmlview.cpp:1682, you'll notice that this is supported already, but is
> only active if no node is currently focused. I could fix it by restoring
> the old behaviour, but I need some information on how you are using
> d->scrollBarMoved.

 That'd be nice.

>
> >  I found using scrollTo() to be better than ensureVisible() - it takes
> > QRect instead of just a point, and seems to be a bit better at
> > positioning. So I'd like to keep the onepage argument. Scrolling by one
> > page for accesskeys definitely doesn't make sense.
>
> I agree with your opinion on the accesskey behaviour.
> But scrollTo() is just a replacement for ensureVisible(), differing only in
> its one-page-per-click scrolling behaviour. If you don't want that, don't
> use that function.
>
> I claim that there is no advantage of
> 	scrollTo(QR)
> over
> 	ensureVisible(QR.center().x(), QR.center().y());
> . The latter does exactly the same as the former if you use it The Right
> Way.
>
> The tiny detail I don't like about your change is that you added a bool
> argument to a function in order to make it behave like another, already
> existing function. That looks like code bloat to me. For that, I'd propose
> that you use ensureVisible, we remove the "bool" argument of the scrollTo()
> function again

 I would, if you show me that right way. Open the attached page in your Konqy 
and press accesskeys 9 or 0 (i.e. Ctrl+Alt+9/0). With ensureVisible() the 
results are (in some cases noticeably) worse.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/

["accesskey.html" (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
<hr>
<form>
<input type=button value="zelva" onclick="window.status='click'" \
onkeypress="window.status='press'" onkeyup="window.status='up'" accesskey=h> <input \
type=checkbox value="check" accesskey=z onclick="window.status='check1'"> <input \
type=checkbox value="check" accesskey=b onclick="window.status='check2'"> <input \
type=text accesskey=4> <input type=password accesskey=5>
<input type=submit accesskey=6>
<input type=reset accesskey=7>
<button name="kuku" value="btn" type=button accesskey=n \
onclick="window.status='button'">Zelva</button> <a href="http://kde.org" \
accesskey=s>link</a> <label accesskey=8>Label1<input type=text></label>
</form>
<MAP NAME=mymap>
<AREA HREF="/reference/" ALT="HTML and CSS Reference" COORDS="5,5,95,195" \
accesskey=1> <AREA HREF="/design/" ALT="Design Guide" COORDS="105,5,195,195" \
accesskey=2> <AREA HREF="/tools/" ALT="Tools" COORDS="205,5,295,195" accesskey=3>
</MAP>
<IMG SRC="sitemap.gif" ALT="Site map" USEMAP="#mymap" WIDTH00 HEIGHT 0>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<textarea accesskey=9 rows` cols  />
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<textarea accesskey=0 rows=2 cols  />
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic