質問

I have downloaded the zip from https://github.com/loopj/jquery-tokeninput and tried the demo.html in firefox and in chrome. In firefox after adding token cursor is being shown up: version in 1.6.1

enter image description here

In google chrome after adding token cursor is NOT being shown up: But when we start typing cursor is shown.

enter image description here

I have tried the loopj version http://loopj.com/jquery-tokeninput/demo.html given there, cursor is being shown in google chrome also. I have looked into js file but couldn't find anything.

How to fix this issue;

役に立ちましたか?

解決

Final Edit: This bug was fixed in Pull Request #557.

UPDATED SOLUTION:

On line 725(ish), there is input_box.width(0), in the add_token method. By giving the input a width of zero, the cursor is hidden from view. I've set this to 1 in my project, which allows me to now see the cursor, I'm yet to find any negative effects, and from what I can see the worst that could happen would be a slightly premature linebreak, which in my implementation I can definitely deal with!

Hope that helps!


ORIGINAL ANSWER: I use a different theme for this plugin in Chrome, but haven't encountered this problem. I was going to suggest posting a bug report, but I guess this could be your post anyway?

Am I reading your post right that the demo's work correctly, just the file you downloaded doesn't? The Demo's run on version 1.6.0 - perhaps try replacing your .js file with that one, and see if that solves your problem as a temporary fix.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top