diff options
author | Daniel Carl <danielcarl@gmx.de> | 2015-04-02 22:37:39 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2015-04-02 22:37:39 +0200 |
commit | ecb434c9b9c795e7977815ba832b01d0b503171f (patch) | |
tree | e0f343523088cb276bd98b8cb8ca26291e486bc4 | |
parent | e4c96815ddf355266aee3b771f59f3d647910ed7 (diff) |
Use case insensitive xpath for focus input (#198).
-rw-r--r-- | src/dom.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -94,9 +94,12 @@ gboolean dom_focus_input(WebKitWebView *view) return false; } + /* Use translate to match xpath expression case insensitive so that also + * intput filed of type="TEXT" are matched. */ result = webkit_dom_document_evaluate( - doc, "//input[not(@type) or @type='text' or @type='password']|//textarea", - html, resolver, 0, NULL, NULL + doc, "//input[not(@type) or translate(@type,'ETX','etx')='text' " + "or translate(@type,'ADOPRSW','adoprsw')='password']|//textarea", + html, resolver, 5, NULL, NULL ); if (!result) { return false; |