Commit a8283054 authored by guy.pyrzak%gmail.com's avatar guy.pyrzak%gmail.com

Bug 448696: "(edit)" links should focus the text box and select all text in them

Patch By Guy Pyrzak <guy.pyrzak@gmail.com> r=mkanat, a=mkanat
parent 6d67154b
......@@ -161,6 +161,12 @@ function hideEditableField( container, input, action, field_id, original_value )
function showEditableField (e, ContainerInputArray) {
YAHOO.util.Dom.setStyle(ContainerInputArray[0], 'display', 'none');
YAHOO.util.Dom.setStyle(ContainerInputArray[1], 'display', 'inline');
var inputs = YAHOO.util.Dom.get(ContainerInputArray[1]).getElementsByTagName('input')
if( inputs.length > 0) {
// focus on the first field, this makes it easier to edit
inputs[0].focus();
inputs[0].select();
}
YAHOO.util.Event.preventDefault(e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment