mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Fix automatic selection of share link
This commit is contained in:
parent
a819a26f34
commit
f2d61496af
2 changed files with 8 additions and 2 deletions
|
@ -23,7 +23,13 @@ Discourse.ShareView = Discourse.View.extend({
|
|||
|
||||
linkChanged: (function() {
|
||||
if (this.present('controller.link')) {
|
||||
$('#share-link input').val(this.get('controller.link')).select().focus();
|
||||
var $linkInput = $('#share-link input');
|
||||
$linkInput.val(this.get('controller.link'));
|
||||
|
||||
// Wait for the fade-in transition to finish before selecting the link:
|
||||
window.setTimeout(function() {
|
||||
$linkInput.select().focus();
|
||||
}, 160);
|
||||
}
|
||||
}).observes('controller.link'),
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
background-color: $light_gray;
|
||||
padding: 3px 7px 6px 7px;
|
||||
width: 300px;
|
||||
@include fades-in(0.25s);
|
||||
@include fades-in(0.15s);
|
||||
&.visible {
|
||||
@include visible;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue