зеркало из https://github.com/mozilla/FlightDeck.git
fixes Bug 664822 - All modal dialogs need to focus their inputs when shown
This commit is contained in:
Родитель
c9ef1a1b17
Коммит
8c81f6df60
|
@ -160,11 +160,15 @@ FlightDeck = Class.refactor(FlightDeck,{
|
||||||
textboxes = $(display).getElements('input[type="text"]');
|
textboxes = $(display).getElements('input[type="text"]');
|
||||||
|
|
||||||
if (data.focus && textboxes.length) {
|
if (data.focus && textboxes.length) {
|
||||||
setTimeout(function() {
|
display.addEvent('onDisplay', function() {
|
||||||
textboxes[0].focus();
|
setTimeout(function() {
|
||||||
}, 5);
|
$log(uid, 'focus', textboxes[0]);
|
||||||
|
textboxes[0].focus();
|
||||||
|
}, 5);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return display;
|
return display;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -248,6 +248,6 @@ authors:
|
||||||
|
|
||||||
.UI_Modal input#new_file,
|
.UI_Modal input#new_file,
|
||||||
.UI_Modal input#new_attachment {
|
.UI_Modal input#new_attachment {
|
||||||
width:71%;
|
width:69%;
|
||||||
padding:0 5px;
|
padding:0 5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,7 +514,6 @@ var Sidebar = new Class({
|
||||||
+ '<input type="text" name="external_attachment" id="external_attachment" placeholder="http:// (URI of an Attachment to download)"/></p>',
|
+ '<input type="text" name="external_attachment" id="external_attachment" placeholder="http:// (URI of an Attachment to download)"/></p>',
|
||||||
ok: 'Create Attachment',
|
ok: 'Create Attachment',
|
||||||
id: 'new_attachment_button',
|
id: 'new_attachment_button',
|
||||||
focus: false, //dont auto focus since first option is to Upload
|
|
||||||
callback: function() {
|
callback: function() {
|
||||||
var uploadInput = $('upload_attachment'),
|
var uploadInput = $('upload_attachment'),
|
||||||
createInput = $('new_attachment'),
|
createInput = $('new_attachment'),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче