[Webkit-unassigned] [Bug 67192] API to set initial focus in gtk webkit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 22 22:45:45 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=67192





--- Comment #42 from Antaryami Pandia <xqb748 at motorola.com>  2011-09-22 22:45:44 PST ---
(In reply to comment #41)
> (In reply to comment #40)
> > > What does this provide that you cannot do with DOM APIs. I guess that's what I'm confused about.
> > 
> > yes.it focuses a node.
> 
> You can focus DOM elements with the GObject DOM APIs. Have you tried that? Is it different from what this patch does? If it is, how is it different?

Sorry If I have unable to represent my issues.
1. I am using it with spatial navigation feature.With current code when a page loads and when user presses tab/arrow key then only the first focusable node is focused i.e displayed with focus ring.
2. But the behavior user may need is as the page loads, he should be able to see the initial focus on node, and on subsequent tab/arrow press he continue from that initial node.
3. To achieve this I need a node which can take focus (link, text box etc) and then focus it. Please note that first focusable node on the page may not be the first node on the page.
4. A option to set the focus based on direction can help, say focus the last focusable node.
5. Sometimes user may want to toggle between modes (spatial and normal). currently I don't have any use case for this scenario, but Qt browser provides this option.


I tried to find a DOM API which does this, but didn't find one. I think a way to do it with it as follows:- 
1. I have to get the list of nodes present on the page, I think with "webkit_dom_node_get_child_nodes" passing the document as a node.
2. Further I have to check each node whether this is a focusable node or not. I have perform this check as I just don't want to focus the first node, but the first focusable node.I didn't find any corresponding DOM API. Please let me know if there is one.
3. When I encounter the first node, focus it using "webkit_dom_element_focus".

Please provide your feedback.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list