Daniel Carl
Karryanna <[email protected]> wrote:
> > I can reproduce it, this is a bug. The hinting script does not know how to
> > handle the <input type="search"/>. There are a lot of input types allowed
> > through [html5][]. At the moment the input mode is started for input type
> > 'text', 'password', 'checkbox' and 'radio' (by the way, makes it no sense to
> > switch to input mode if a radion button is hinted).
>
> OK, I'll hope for a fix then.
The attached patch should fix the issue. I haven't tested this much, and
restructured the hinting decision completely, so maybe some other hinting will
be broken.
The main change is that we switch to input mode for most input types and make
some exceptions for input types that expect no input 'radio', 'checkbox',
'submit', 'reset', 'button' and 'image'. Maybe there will some of the new
html5 input types that shouldn't force vimprobable into input mode too.
Daniel
>From af42eddf7ecadf70f76b3004b0e5e7b3b71f44cf Mon Sep 17 00:00:00 2001
From: Daniel Carl <[email protected]>
Date: Tue, 4 Mar 2014 23:05:12 +0100
Subject: [PATCH] Switch to inputmode also for input type search.
---
hinting.js | 18 ++++++++++++++----
main.c | 2 ++
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/hinting.js b/hinting.js
index 4997cae..0f86e7b 100644
--- a/hinting.js
+++ b/hinting.js
@@ -248,11 +248,21 @@ function Hints() {
this.clearHints();
- if (tag == "iframe" || tag == "frame" || tag == "textarea" || tag == "input" && (el.type == "text" || el.type == "password" || el.type == "checkbox" || el.type == "radio") || tag == "select") {
- el.focus();
- if (tag == "input" || tag == "textarea") {
- return "insert;";
+ if (tag == "input" || tag == "textarea" || tag == "select") {
+ if (el.type == "radio" || el.type == "checkbox") {
+ el.focus();
+ _clickElement(el);
+ return "done;";
+ }
+ if (el.type == "submit" || el.type == "reset" || el.type == "button" || el.type === "image") {
+ _clickElement(el);
+ return "done;";
}
+ el.focus();
+ return "insert;";
+ }
+ if (tag == "iframe" || tag == "frame") {
+ e.focus();
return "done;";
}
diff --git a/main.c b/main.c
index d70f88a..92853af 100644
--- a/main.c
+++ b/main.c
@@ -1480,6 +1480,8 @@ set(const Arg *arg) {
echo_message(Info | NoAutoHide, "-- PASS TROUGH (next) --");
break;
case ModeInsert: /* should not be called manually but automatically */
+ /* make sure we leaf focus from inputbox to show the new mode */
+ gtk_widget_grab_focus(GTK_WIDGET(client.gui.webview));
echo_message(Info | NoAutoHide, "-- INSERT --");
break;
default:
--
1.9.0
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Vimprobable-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vimprobable-users