Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Commit 715326d

Browse files
committed
Merge pull request #345 from twiss/firefox-focus-bugs
Firefox focus bugs
2 parents eaa9841 + f706e8c commit 715326d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/regions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ function nav2() {
9191

9292
if (tempLoc == 'edit') {
9393
// Focus editor
94-
editor.focus();
94+
setTimeout(function() {
95+
editor.focus();
96+
});
9597
} else if (tempLoc != 'welcome-edit-mode') {
9698
// Focus first input
9799
setTimeout(function() {
98100
var input = tempElement.querySelector('input:not([disabled])') || tempElement.querySelector('button');
99101
if (input) {
102+
editor.blur();
100103
input.focus();
101104
if(input.select) input.select();
102105
}

0 commit comments

Comments
 (0)