fix keyboard navigation for string annotation bins with newline separator

This commit is contained in:
rolux 2018-09-12 19:49:37 +02:00
parent 8ea30caf4d
commit 6618809eb5

View file

@ -90,10 +90,18 @@ Ox.ArrayEditable = function(options, self) {
}, 0);
},
key_escape: selectNone,
key_down: self.options.type == 'input' ? selectLast : selectNext,
key_left: self.options.type == 'input' ? selectPrevious : selectFirst,
key_right: self.options.type == 'input' ? selectNext : selectLast,
key_up: self.options.type == 'input' ? selectFirst : selectPrevious,
key_down: self.options.type == 'input'
&& !Ox.contains(self.options.separator, '<br')
? selectLast : selectNext,
key_left: self.options.type == 'input'
&& !Ox.contains(self.options.separator, '<br')
? selectPrevious : selectFirst,
key_right: self.options.type == 'input'
&& !Ox.contains(self.options.separator, '<br')
? selectNext : selectLast,
key_up: self.options.type == 'input'
&& !Ox.contains(self.options.separator, '<br')
? selectFirst : selectPrevious,
singleclick: singleclick,
touchstart: singleclick
});