如何将焦点保持在网格或视图中?
如果我向左,向右,向上或向下走太远,使用箭头键或模拟器遥控器会失去焦点。
我已经尝试过聚光灯:'容器' ,但这似乎不起作用。
堆栈追踪:
Uncaught TypeError: Cannot read property 'offsetWidth' of null dom.js:353
enyo.dom.getAbsoluteBounds dom.js:353
enyo.kind.getAbsoluteBounds Control.js:662
_calculateNearestNeighbor enyo.Spotlight.NearestNeighbor.js:170
getNearestPointerNeighbor enyo.Spotlight.NearestNeighbor.js:200
_spotNearestToPointer enyo.Spotlight.js:262
onKeyDown enyo.Spotlight.js:485
onEvent enyo.Spotlight.js:311
(anonymous function) enyo.Spotlight.js:799
enyo.dispatcher.dispatch dispatcher.js:73
enyo.dispatch
任何想法
由于
答案 0 :(得分:0)
修改了dom.js,似乎已经完成了这个伎俩。
var width = 0; //node.offsetWidth;
var height = 0; //node.offsetHeight
if(node){
var width = node.offsetWidth;
var height = node.offsetHeight
}