diff options
author | portix <portix@gmx.net> | 2011-09-12 18:26:47 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2011-09-12 18:26:47 +0200 |
commit | 628f32ec30ac869b4c836609351faee4585f5d4c (patch) | |
tree | 1c5b0c7a2cc053628aaa938533b7660ba27abd84 /src/html.c | |
parent | 86034bd5befa68ff686ba4d6355d906cf381bd4b (diff) | |
download | dwb-628f32ec30ac869b4c836609351faee4585f5d4c.zip |
In keys-view, blur element on value-changed
--HG--
branch : develop
Diffstat (limited to 'src/html.c')
-rw-r--r-- | src/html.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -156,6 +156,11 @@ dwb_html_key_changed_cb(WebKitDOMElement *target, WebKitDOMEvent *e, gpointer da dwb_set_key(id, value); return true; } +static gboolean +dwb_html_key_really_changed_cb(WebKitDOMElement *target, WebKitDOMEvent *e, gpointer data) { + webkit_dom_element_blur(target); + return true; +} void dwb_html_keys_load_cb(WebKitWebView *wv, GParamSpec *p, HtmlTable *table) { KeyMap *km; @@ -173,7 +178,7 @@ dwb_html_keys_load_cb(WebKitWebView *wv, GParamSpec *p, HtmlTable *table) { mod = dwb_modmask_to_string(km->mod); value = g_strdup_printf("%s%s%s", mod, strlen(mod) > 0 ? " " : "", km->key ? km->key : ""); webkit_dom_html_input_element_set_value(WEBKIT_DOM_HTML_INPUT_ELEMENT(input), value); - webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(input), "change", G_CALLBACK(dwb_html_key_changed_cb), false, wv); + webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(input), "change", G_CALLBACK(dwb_html_key_really_changed_cb), false, wv); webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(input), "blur", G_CALLBACK(dwb_html_key_changed_cb), false, wv); webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(input), "focus", G_CALLBACK(dwb_html_focus_cb), false, wv); FREE(mod); |