activate vs. click event

Tobias Anton TA at ESC-Electronics.de
Mon Jul 12 19:59:21 BST 2004


On Montag, 12. Juli 2004 19:54, Germain Garand wrote:
> I think the idea is great too, but that the khtmlview ID_LABEL test and
> block should be displaced within the focus handling block, like:
>
> -    if( node->isSelectable()) {
> +    if( node->isSelectable() || node->id() == ID_LABEL) {
> +        if (node->id()==ID_LABEL) {
> +            // if Accesskey is a label, give focus to the label's
> referrer. +            node=static_cast<ElementImpl *>(static_cast<
> HTMLLabelElementImpl* >( node )->getFormElement());
> +            if (!node) return true;
> +            guard = node;
> +        }
>
> Otherwise that won't work for textareas, because of:
>          case ID_TEXTAREA:
>            break; // just focusing it is enough
>
> Testcase:
> http://www.htmlgoodies.com/tutors/accesskey.html
> (try accessing the lineedits in the middle of the page)
>
> Otherwise, please go ahead!
> Germain

Hmm, it was me who okayed this patch two times even though you had objections.
And I even said "blame me" :-}

So I think I am to fix this. Done.

I also made labels focusable and set the activation of the associated form 
control to be the default reaction to a key release of space, return or enter 
- analogous to the code in HTMLGenericFormElementImpl.

Cheers
-- Tobias





More information about the kfm-devel mailing list