How to insure that konq/e always has focus?

Luciano Montanaro mikelima at cirulla.net
Thu Jan 26 20:09:54 CET 2006


On Thursday 26 January 2006 20:00, yan seiner wrote:
> I am using javascript to navigate around the konq/e window.  Basically
> the javascript intercepts the keystroke, and if it is an arrow key it
> moves the focus appropriately.  Each input field is given focus using
> document.getElementById("a"+idx).focus(); .  what should happen is that
> if an input field is outside of the visible window konq should scroll
> the screen so that the focused element is visible.
>
> But no scrolling takes place....  And, AFAICT, once the focus has
> shifted outside the konqueror window loses focus so it no longer sees
> any keyboard events....
>
> This works fine if I use the Tab key to shift focus.  But if I use
> Javascript scrolling seems broken.  I could hack it by manuall scroll()
> ing the window, but AFAIK a focused input element should always be
> visible....
>
> The javascript works fine if I use firefox....
>
> I've posted the files in question here:
>
> http://www.seiner.com/ts7000/test4.js
> http://www.seiner.com/ts7000/test5.html
>

I have not figured out how to check the behaviour. But if the problem 
appears in Konqueror itself, please file a bug report about it. 

I think it should be easy to fix, probably there is an "ensureVisible()" 
call missing somewhere. I'm going home now; maybe I'll look at that 
tomorrow or during the weekend.

Luciano

-- 
Luciano Montanaro //
              \\ //
               \x/ www.cirulla.net


More information about the konq-e mailing list