diff --git a/app/assets/javascripts/discourse/views/share_view.js b/app/assets/javascripts/discourse/views/share_view.js index cd1212779..02f4cf7ab 100644 --- a/app/assets/javascripts/discourse/views/share_view.js +++ b/app/assets/javascripts/discourse/views/share_view.js @@ -30,18 +30,16 @@ Discourse.ShareView = Discourse.View.extend({ window.setTimeout(function() { $linkInput.select().focus(); }, 160); - } else { - $('#share-link').css('top', 0); } }.observes('controller.link'), didInsertElement: function() { - var shareView = this; $('html').on('mousedown.outside-share-link', function(e) { // 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. if (shareView.$().has(e.target).length !== 0) { return; } + shareView.get('controller').close(); return true; }); diff --git a/app/assets/stylesheets/application/share_link.css.scss b/app/assets/stylesheets/application/share_link.css.scss index 6db68753b..a80ef0c9a 100644 --- a/app/assets/stylesheets/application/share_link.css.scss +++ b/app/assets/stylesheets/application/share_link.css.scss @@ -6,16 +6,15 @@ #share-link { position: absolute; left: 20px; - top: 0; z-index: 990; @include border-radius-all(3px); @include box-shadow(1px 1px 5px $darkish_gray); background-color: $light_gray; padding: 3px 7px 6px 7px; width: 300px; - @include fades-in(0.15s); + display: none; &.visible { - @include visible; + display: block; } input[type=text] { width: 96%;