Auto-select share link text
This commit is contained in:
parent
5c0aeb1558
commit
dc8751cf7a
1 changed files with 5 additions and 0 deletions
|
@ -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];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue