Skip to content

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

Description

@cbellitti

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;
.
.
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions