FIX issues with quote button
Fix the following issues - Quote button quotes only one word on iOS - Quote reply popup should not come up when selecting the text in the ‘reply’ button
This commit is contained in:
parent
934ede7d91
commit
12ac2f2e99
|
@ -45,9 +45,7 @@ Discourse.QuoteButtonController = Discourse.Controller.extend({
|
||||||
cloned = range.cloneRange(),
|
cloned = range.cloneRange(),
|
||||||
$ancestor = $(range.commonAncestorContainer);
|
$ancestor = $(range.commonAncestorContainer);
|
||||||
|
|
||||||
// don't display the "quote reply" button if you select text spanning two posts
|
if ($ancestor.closest('.cooked').length === 0) {
|
||||||
// note: the ".contents" is here to prevent selection of the topic summary
|
|
||||||
if ($ancestor.closest('.topic-body > .contents').length === 0) {
|
|
||||||
this.set('buffer', '');
|
this.set('buffer', '');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ Discourse.QuoteButtonView = Discourse.View.extend({
|
||||||
})
|
})
|
||||||
.on('selectionchange', function() {
|
.on('selectionchange', function() {
|
||||||
// there is no need to handle this event when the mouse is down
|
// there is no need to handle this event when the mouse is down
|
||||||
// or if there is not a touch in progress
|
// or if there a touch in progress
|
||||||
if (view.get('isMouseDown') || !view.get('isTouchInProgress')) return;
|
if (view.get('isMouseDown') || view.get('isTouchInProgress')) return;
|
||||||
// `selection.anchorNode` is used as a target
|
// `selection.anchorNode` is used as a target
|
||||||
view.selectText(window.getSelection().anchorNode, controller);
|
view.selectText(window.getSelection().anchorNode, controller);
|
||||||
});
|
});
|
||||||
|
|
|
@ -58,16 +58,6 @@
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin border-radius-top($radius) {
|
|
||||||
border-top-right-radius: $radius;
|
|
||||||
border-top-left-radius: $radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin border-radius-bottom($radius) {
|
|
||||||
border-bottom-right-radius: $radius;
|
|
||||||
border-bottom-left-radius: $radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Box shadow
|
// Box shadow
|
||||||
|
|
||||||
@mixin box-shadow($shadow) {
|
@mixin box-shadow($shadow) {
|
||||||
|
@ -81,32 +71,6 @@
|
||||||
background-image: linear-gradient(to bottom, $start-color, $end-color);
|
background-image: linear-gradient(to bottom, $start-color, $end-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Background size
|
|
||||||
|
|
||||||
@mixin background-size($size) {
|
|
||||||
background-size: $size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Background clip
|
|
||||||
|
|
||||||
@mixin background-clip($clip) {
|
|
||||||
background-clip: $clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rotate
|
|
||||||
|
|
||||||
@mixin rotate($degrees) {
|
|
||||||
-webkit-transform: rotate($degrees);
|
|
||||||
transform: rotate($degrees);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scale
|
|
||||||
|
|
||||||
@mixin scale($ratio) {
|
|
||||||
-webkit-transform: scale($ratio);
|
|
||||||
transform: scale($ratio);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transition
|
// Transition
|
||||||
|
|
||||||
@mixin transition($transition) {
|
@mixin transition($transition) {
|
||||||
|
@ -138,12 +102,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin fade-soft($time: 1s) {
|
|
||||||
-webkit-transition: opacity $time ease-in-out;
|
|
||||||
-ms-transition: opacity $time ease-in-out;
|
|
||||||
transition: opacity $time ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin visible {
|
@mixin visible {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
@ -151,16 +109,6 @@
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decorations
|
|
||||||
// --------------------------------------------------
|
|
||||||
|
|
||||||
// Glow
|
|
||||||
|
|
||||||
@mixin glow($color) {
|
|
||||||
border: 1px solid $color;
|
|
||||||
box-shadow: 0 0 5px $color;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -432,8 +432,7 @@ div.ac-wrap {
|
||||||
}
|
}
|
||||||
|
|
||||||
#wmd-input, #wmd-preview {
|
#wmd-input, #wmd-preview {
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
@ -453,7 +452,7 @@ div.ac-wrap {
|
||||||
top: 0;
|
top: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
border: 0;
|
border: 0;
|
||||||
border-top: 36px solid transparent;
|
border-top: 36px solid transparent;
|
||||||
@include border-radius-all(0);
|
@include border-radius-all(0);
|
||||||
|
@ -461,8 +460,7 @@ div.ac-wrap {
|
||||||
}
|
}
|
||||||
.textarea-wrapper, .preview-wrapper {
|
.textarea-wrapper, .preview-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-actions {
|
.post-actions {
|
||||||
|
@include unselectable;
|
||||||
clear: both;
|
clear: both;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
.post-action {
|
.post-action {
|
||||||
|
|
|
@ -78,9 +78,7 @@
|
||||||
.btn {
|
.btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
-webkit-box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
|
|
|
@ -389,8 +389,7 @@ div.ac-wrap {
|
||||||
}
|
}
|
||||||
|
|
||||||
#wmd-input, #wmd-preview {
|
#wmd-input, #wmd-preview {
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
@ -410,7 +409,7 @@ div.ac-wrap {
|
||||||
top: 0;
|
top: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
border: 0;
|
border: 0;
|
||||||
border-top: 36px solid transparent;
|
border-top: 36px solid transparent;
|
||||||
@include border-radius-all(0);
|
@include border-radius-all(0);
|
||||||
|
@ -418,8 +417,7 @@ div.ac-wrap {
|
||||||
}
|
}
|
||||||
.textarea-wrapper, .preview-wrapper {
|
.textarea-wrapper, .preview-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -147,9 +147,7 @@ $caption-subtitle-color: #BDBDBD !default;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
padding: 0 $popup-padding-left;
|
padding: 0 $popup-padding-left;
|
||||||
-webkit-box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vertical centerer helper
|
// Vertical centerer helper
|
||||||
|
@ -453,9 +451,7 @@ button::-moz-focus-inner {
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
-webkit-box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: $image-padding-top 0 $image-padding-bottom;
|
padding: $image-padding-top 0 $image-padding-bottom;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
@ -534,9 +530,7 @@ button::-moz-focus-inner {
|
||||||
top: auto;
|
top: auto;
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
-webkit-box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
.mfp-img-mobile .mfp-bottom-bar:empty {
|
.mfp-img-mobile .mfp-bottom-bar:empty {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
@ -73,9 +73,7 @@
|
||||||
.btn {
|
.btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
-webkit-box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
|
|
Loading…
Reference in New Issue