Просмотр исходного кода

Place the linksharing popover from the right, not the left.

This ensures the popover reflows properly with window resize.
Shane Kilkelly 9 лет назад
Родитель
Сommit
42c0974671

+ 3 - 3
services/web/public/coffee/ide/LinkSharingOnboardingController.coffee

@@ -15,7 +15,7 @@ define [
 			offset = shareBtn.offset()
 			popover.show()
 			$scope.placement = 'bottom'
-			popover.offset({
-				top: offset.top + 11 + shareBtn.height(),
-				left: offset.left - 180
+			popover.css({
+				top: '' + (2) + 'px',
+				right: '' + (window.innerWidth - offset.left - (shareBtn.width() * 1.5) ) + 'px'
 			})

+ 3 - 0
services/web/public/stylesheets/app/editor/feature-onboarding.less

@@ -147,6 +147,9 @@ a.feat-onboard-dismiss {
 .onboarding-linksharing {
 	display: block;
 	top: 10px;
+	&.popover {
+		left: auto !important;
+	}
 
 	img {
 		margin-bottom: 10px;