=== SlimBrowserApplet.lua ================================================================== --- SlimBrowserApplet.lua (revision 36500) +++ SlimBrowserApplet.lua (local) @@ -216,6 +216,7 @@ local commandString = _stringifyJsonRequest(jsonAction) local lastBrowse = _player:getLastBrowse(commandString) + step.commandString = commandString if not lastBrowse or isContextMenu then _player.menuAnchor = nil @@ -235,7 +236,6 @@ end log:debug('We\'ve been here before, lastBrowse index was: ', lastBrowse.index) - _player.lastKeyTable = lastBrowse _player.menuAnchorSet = false --don't use anchor if position is first element, breaks windows that have zero sized menu (textarea, for example), and @@ -1965,16 +1965,15 @@ -- figure out the item action... local evtType = event:getType() - local currentlySelectedIndex = _getCurrentStep().menu:getSelectedIndex() - if _player and _player.lastKeyTable and evtType == EVENT_FOCUS_GAINED then + local currentlySelectedIndex = step and step.menu and step.menu:getSelectedIndex() + if _player and _player:getLastBrowse(step.commandString) and evtType == EVENT_FOCUS_GAINED then if currentlySelectedIndex then - _player.lastKeyTable.index = currentlySelectedIndex + _player:getLastBrowse(step.commandString).index = currentlySelectedIndex else - _player.lastKeyTable.index = 1 + _player:getLastBrowse(step.commandString).index = 1 end end - -- we don't care about focus: we get one everytime we change current item -- and it just pollutes our logging. if evtType == EVENT_FOCUS_GAINED