Ensure the debugger container has focus when loaded. Fixes #3295 - this time on Firefox too!

pull/17/head
Aditya Toshniwal 2018-05-18 11:33:42 +01:00 committed by Dave Page
parent a4ed9d6976
commit 6492dacbb2
1 changed files with 7 additions and 2 deletions

View File

@ -1850,8 +1850,13 @@ define([
self.docker.off(wcDocker.EVENT.LOADED);
// Register the callback when user set/clear the breakpoint on gutter area.
self.editor.on('gutterClick', self.onBreakPoint.bind(self), self);
// Set focus to the debugger container
self.$container.focus();
/* Set focus to the debugger container
* Focus does not work in firefox without tabindex attr
* so, setting focus to parent of $container which is #container
*/
if(self.docker.$container){
self.docker.$container.parent().focus();
}
};
self.docker.startLoading(gettext('Loading...'));