List Info

Thread: Konqueror and Autosuggest boxes




Konqueror and Autosuggest boxes
country flaguser name
United Kingdom
2007-02-14 15:48:47
Hi all,

I hope this is the right forum for this question ... I've
included a 
sample page
which demonstrates the problem.

I am trying to implement an autosuggest drop down box and
have built one up
from an example on the web. It works in IE, Firefox,
Ephiphany and to an 
extent
in Opera. Unfortunately in Konqueror, the drop down box does
not appear. 
Does
anyone have any experience of writing these for Konqueror,
or know of 
any pitfalls
that one needs to be aware of? When I've tested what
keyCodes are 
returned when
pressing keys in the input, it comes back with 0 each time
in Konqueror 
but the
expected keys on the other browsers, so I suspect it is the
way the 
keyCodes are
being picked up that is the problem.

The keypresses on the text input are registered to the
autoSuggest 
object using
                this.textbox.onkeydown = function (oEvent)
{
                    if (!oEvent) oEvent = window.event;
                    oThis.handleKeyDown(oEvent);
                };
(where oThis is a reference to an AutoSuggestControl object)
etc for 
other key presses,
and the autoSuggest object handles these as ...
              AutoSuggestControl.prototype.handleKeyUp =
function (oEvent) {
                var iKeyCode = oEvent.keyCode;
// alert(iKeyCode);
                if (iKeyCode == 8 || iKeyCode == 46)
                    this.provider.requestSuggestions(this,
false);
                if (iKeyCode < 32 || (iKeyCode >= 33
&& iKeyCode <= 46) 
|| (iKeyCode >= 112 && iKeyCode <= 123)) {
                    //ignore
                } else {
                    this.provider.requestSuggestions(this);
                }
            };
When I check the keyCodes here they are 0 in Konqueror.

How can you extract the keys from events in Konqueror and on
what elements?
Does anyone have any good sources for event programming on
Konqueror, in 
particular picking
up key presses?

Thank in advance for any pointers

Regards

Neill Jones


  
Re: Konqueror and Autosuggest boxes
country flaguser name
United States
2007-02-15 09:20:52
> Hi all,
>
> I hope this is the right forum for this question ...
I've included a
> sample page
> which demonstrates the problem.

Hi.. Thanks for the testcase, but it actually works fine for
me, in 3.5.6
(Well, the popup is mispositioned slightly, but that's not
about key
events)... There were no changes in keyEvent-type interface
since then,
and while there were changes in input event routing for
native widgets, I
believe they only apply to <textarea>, so I am not
sure what exactly got
fixed..
>
> How can you extract the keys from events in Konqueror
and on what
> elements?
> Does anyone have any good sources for event programming
on Konqueror, in
> particular picking
> up key presses?

It should work as a bit of a hybrid between mozilla and IE
behavior --
i.e. when one doesn't return 0 in either keyCode or charCode
or such, it
tries to provide the code. Plus, the keyboard stuff in
http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-200
31107/ is supported..

> Thank in advance for any pointers

Thanks for trying to support us,
Maks.



[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )