Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor goes to the begining if you dont have LockInput on. #24

Closed
ghstahl opened this issue Sep 20, 2011 · 12 comments
Closed

Cursor goes to the begining if you dont have LockInput on. #24

ghstahl opened this issue Sep 20, 2011 · 12 comments
Labels

Comments

@ghstahl
Copy link

ghstahl commented Sep 20, 2011

Demo: Qwerty Text has the problem, Qwerty Text Area doesn't.
(lockInput: true) is set for Qwerty Text Area.

Problem: When you click on the background or black space of the virtual keyboard the cursor disappears. When you start clicking on values again you will notice the cursor moved to the begining and the new characters are entered there.

This does not happen when you turn lockinput on.

@Mottie
Copy link
Owner

Mottie commented Sep 20, 2011

This is a known issue in Safari... see the readme.markdown file:

Safari: See the QWERTY Text Area demo with a locked input. While using the virtual keyboard to type, it enters the text in backwards! This is because textareas with a "readonly" attribute always returns zero for the caret postion.

I've submitted a bug report to Safari but I still haven't heard back.

@ghstahl
Copy link
Author

ghstahl commented Sep 20, 2011

http://mottie.github.com/Keyboard/
I test the QWERTY Text on the following browsers:
Firefox - OK,
Safari - OK,
Chrome -OK,
IE9 - FAIL

Are you confusing another defect with this one, because the Text Area works on every browser I tried. It is the Text input that I am having a problem with.

@Mottie
Copy link
Owner

Mottie commented Sep 20, 2011

Oh ok, I understand what you are saying now. I just tested this and it seems to work just fine for me.

Clicking on the background/space between buttons, the input loses focus. The keyboard plugin saves the caret position when it loses focus because of the IE problem you mention; so when you click on the virtual keyboard key, it should enter the value in the proper location.... as I said, it's working for me. Are you sure both the browser and document modes are set to IE9?

@Mottie
Copy link
Owner

Mottie commented Oct 12, 2011

Duh, sorry I can be blond some days... I do see this bug and I'll have a fix for it in the next update.

@Mottie
Copy link
Owner

Mottie commented Oct 16, 2011

Ok, this bug has been fixed in version 1.9. Check out all of the other cool stuff that was added too!

@Mottie Mottie closed this as completed Oct 16, 2011
@banku
Copy link

banku commented Feb 23, 2012

4 months later, I am trying to use this keyboard and have run into the same issue when using IE9. Don't seem to find the solution to it.
Is there a way to just not let the keyboard js modify the caret position at all. That's what I need.

@Mottie
Copy link
Owner

Mottie commented Feb 23, 2012

I'm sorry, can you explain the problem you are seeing? Does it involve the lockInput option?

@banku
Copy link

banku commented Feb 23, 2012

Thanks so much for your quick response.

I have the lockInput set to false. Also, this is specific to the IE9 browser.

Issue: When I click on a textbox, the keyboard shows up. Now I am expecting the caret to be positioned exactly where I click (like lets say the third character from the left). But it goes right to the beginning of the textbox. I have to click again to bring to where I need it.

@banku
Copy link

banku commented Feb 23, 2012

When I saw the below code in your js file, I thought I had found the holy grail and all I needed was to change IE 8 to IE 9 to make it work.

$('').appendTo('body').remove();

But even though that started setting base.msie = true correctly, now the caret goes to the last saved point instead of where I click.

@banku
Copy link

banku commented Feb 23, 2012

Now that is smart behavior but my QA guy is still not happy since this is a different behavior from what one would expect if I was not attaching the keyboard at all. The thing is whenever I click into a textbox, the caret should just stay there and not move from there until I type something or click at some other place. How can I make this behavior happen.

@Mottie
Copy link
Owner

Mottie commented Feb 23, 2012

Hi Banku!

I just commited version 1.9.11 which now saves the caret position as you requested. It also works in Firefox and Opera, but not in the webkit browsers for some reason.

@banku
Copy link

banku commented Feb 24, 2012

Hey Mottie,
I downloaded it and it works for my IE9. This is so awesome. You fixed the bug the same day I posted it. You are the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants