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

Caret Does Not Go to pos. '0' when using Mottie Left Arrow Key #315

Closed
cbellitti opened this issue Nov 13, 2014 · 2 comments
Closed

Caret Does Not Go to pos. '0' when using Mottie Left Arrow Key #315

cbellitti opened this issue Nov 13, 2014 · 2 comments
Labels

Comments

@cbellitti
Copy link

When using the left arrow key on the Mottie KB, clicking it will move the caret to the left (I am not using the preview), but the caret will stop at position 1 and not go back to the beginning (position 0). I have implemented a fix for the is in the Mottie code (jquery.keyboard.js, in the caret() function - I will share it below. As you can see I added a condition to the if statement so when options.start and options.end are 0, they can pass through.
.
.
.

var s, start, e, end, selRange, range, stored_range, te, val,
selection = document.selection, t = this[0], sTop = t.scrollTop,
ss = false, supportCaret = true;
try {
ss = typeof t.selectionStart !== 'undefined';
} catch(err){
supportCaret = false;
}
if ((typeof options === 'object' && options.start && options.end)||
(typeof options === 'object' && options.start==0 && options.end==0)) {
start = options.start;
end = options.end;
.
.
.

@Mottie
Copy link
Owner

Mottie commented Nov 13, 2014

Hi @cbellitti!

Thanks for reporting this issue and sharing the fix! I have push these changes to the working branch for now. I'll try to spend some time on the plugin this weekend and push the next update to master.

@Mottie
Copy link
Owner

Mottie commented Nov 20, 2014

Ok, this should be fixed in 1.19.0. Thanks for your patience!

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

2 participants