mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
strip out css fade-in animation from share dialog, it was only causing trouble. Fixing it is more hassle than it is worth. inivisible elements take height so we constantly need to worry about re-positioning the hidden share dialog.
This commit is contained in:
parent
0b74c2da9c
commit
fd6e86483f
@ -30,18 +30,16 @@ Discourse.ShareView = Discourse.View.extend({
|
|||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
$linkInput.select().focus();
|
$linkInput.select().focus();
|
||||||
}, 160);
|
}, 160);
|
||||||
} else {
|
|
||||||
$('#share-link').css('top', 0);
|
|
||||||
}
|
}
|
||||||
}.observes('controller.link'),
|
}.observes('controller.link'),
|
||||||
|
|
||||||
didInsertElement: function() {
|
didInsertElement: function() {
|
||||||
|
|
||||||
var shareView = this;
|
var shareView = this;
|
||||||
$('html').on('mousedown.outside-share-link', function(e) {
|
$('html').on('mousedown.outside-share-link', function(e) {
|
||||||
// Use mousedown instead of click so this event is handled before routing occurs when a
|
// Use mousedown instead of click so this event is handled before routing occurs when a
|
||||||
// link is clicked (which is a click event) while the share dialog is showing.
|
// link is clicked (which is a click event) while the share dialog is showing.
|
||||||
if (shareView.$().has(e.target).length !== 0) { return; }
|
if (shareView.$().has(e.target).length !== 0) { return; }
|
||||||
|
|
||||||
shareView.get('controller').close();
|
shareView.get('controller').close();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
@ -6,16 +6,15 @@
|
|||||||
#share-link {
|
#share-link {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
top: 0;
|
|
||||||
z-index: 990;
|
z-index: 990;
|
||||||
@include border-radius-all(3px);
|
@include border-radius-all(3px);
|
||||||
@include box-shadow(1px 1px 5px $darkish_gray);
|
@include box-shadow(1px 1px 5px $darkish_gray);
|
||||||
background-color: $light_gray;
|
background-color: $light_gray;
|
||||||
padding: 3px 7px 6px 7px;
|
padding: 3px 7px 6px 7px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
@include fades-in(0.15s);
|
display: none;
|
||||||
&.visible {
|
&.visible {
|
||||||
@include visible;
|
display: block;
|
||||||
}
|
}
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
|
Loading…
Reference in New Issue
Block a user