Auto-select share link text

This commit is contained in:
John Firebaugh 2013-07-09 15:55:04 -07:00
parent 5c0aeb1558
commit dc8751cf7a

View file

@ -38,6 +38,7 @@ L.OSM.share = function (options) {
var $input = $('<input />') var $input = $('<input />')
.attr('type', 'text') .attr('type', 'text')
.on('click', select)
.appendTo($share_link); .appendTo($share_link);
var $list = $('<ul>') var $list = $('<ul>')
@ -79,6 +80,10 @@ L.OSM.share = function (options) {
); );
} }
function select() {
$(this).select();
}
return $container[0]; return $container[0];
}; };