Skip to content
Snippets Groups Projects
Commit 9a80b697 authored by Steve Champagne's avatar Steve Champagne Committed by Marijn Haverbeke
Browse files

[dialog addon] Set the focus before setting the text.

parent 8be7d325
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,8 @@
var inp = dialog.getElementsByTagName("input")[0], button;
if (inp) {
inp.focus();
if (options.value) {
inp.value = options.value;
if (options.selectValueOnOpen !== false) {
......@@ -79,8 +81,6 @@
});
if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
inp.focus();
} else if (button = dialog.getElementsByTagName("button")[0]) {
CodeMirror.on(button, "click", function() {
close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment