minor tweaking / cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-06-30 02:21:05 +03:00
parent 819f3cafe9
commit d431807da0

View File

@ -3104,14 +3104,12 @@ var BaseBrowserPrototype = {
options = Object.assign( options = Object.assign(
{ skipDisabled: !(this.options || {}).focusDisabledItems }, { skipDisabled: !(this.options || {}).focusDisabledItems },
options || {}) options || {})
this.focus(this.get('next', options) || this.get('first', options)) return this.focus(this.get('next', options) || this.get('first', options)) },
return this },
prev: function(options){ prev: function(options){
options = Object.assign( options = Object.assign(
{ skipDisabled: !(this.options || {}).focusDisabledItems }, { skipDisabled: !(this.options || {}).focusDisabledItems },
options || {}) options || {})
this.focus(this.get('prev', options) || this.get('last', options)) return this.focus(this.get('prev', options) || this.get('last', options)) },
return this },
// selection... // selection...
select: makeItemOptionOnEventMethod('select', 'selected', { select: makeItemOptionOnEventMethod('select', 'selected', {
options: function(){ options: function(){
@ -3512,7 +3510,9 @@ var focusItem = function(direction){
// hold repeat at last element... // hold repeat at last element...
focused === (direction == 'up' ? first : last) focused === (direction == 'up' ? first : last)
&& this.keyboard.pauseRepeat && this.keyboard.pauseRepeat
&& this.keyboard.pauseRepeat() } } && this.keyboard.pauseRepeat()
return this } }
// XXX this behaves in an odd way with .options.scrollBehavior = 'smooth' // XXX this behaves in an odd way with .options.scrollBehavior = 'smooth'
var focusPage = function(direction){ var focusPage = function(direction){
var d = direction == 'up' ? var d = direction == 'up' ?