From 11a06994df648bea20c2440c658ce887b74c81b5 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Wed, 9 Nov 2011 15:47:33 -0600 Subject: Add funky workaround for fancy rich edit boxes in RT HTML5 defines a new property called "editable". None of the old textarea or input properties has that so I never keyed off it. Turn out that it is used so treat these as editable things as well. This works around an issue in the RT rich text editor which is special in it's own way. --- xxxterm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xxxterm.c b/xxxterm.c index 7659877..fac842f 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -2626,6 +2626,23 @@ dom_is_input(struct tab *t, WebKitDOMElement **active) for (;;) { a = webkit_dom_html_document_get_active_element( (WebKitDOMHTMLDocument*)doc); + if (a == NULL) + return (0); + + /* + * I think this is a total hack because this property isn't + * set for textareas or input however, it is set for jquery + * textareas that do rich text. Since this works around issues + * in RT we'll simply keep it! + * + * This might break some other stuff but for now it helps. + */ + if (webkit_dom_html_element_get_is_content_editable( + (WebKitDOMHTMLElement*)a)) { + *active = a; + return (1); + } + frame = (WebKitDOMHTMLFrameElement *)a; if (WEBKIT_DOM_IS_HTML_FRAME_ELEMENT(frame)) { doc = webkit_dom_html_frame_element_get_content_document( -- cgit 1.4.1-2-gfad0