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

fix(taBind): Fix formatting issues when focussing textAngular via tab key #483

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/textAngular.js
Expand Up @@ -1194,7 +1194,13 @@ angular.module('textAngular.taBind', ['textAngular.factories', 'textAngular.DOM'
}
});

element.on('keyup', function(event, eventData){
element.on('keyup', function(event, eventData) {
if (event.keyCode == 9) {
var _selection = taSelection.getSelection();
if(_selection.start.element === element[0] && element.children().length) taSelection.setSelectionToElementStart(element.children()[0]);
return;
}

/* istanbul ignore else: this is for catching the jqLite testing*/
if(eventData) angular.extend(event, eventData);
if(_undoKeyupTimeout) $timeout.cancel(_undoKeyupTimeout);
Expand Down