投稿のURLプレビューポップアップを改良 (#6226)
* URLプレビューポップアップを改良 - タッチデバイスでは表示しないように - 幅をレスポンシブに * Use maxTouchPoints to detect touch device * fix
This commit is contained in:
@@ -36,7 +36,7 @@ export default Vue.extend({
|
||||
|
||||
mounted() {
|
||||
const rect = this.source.getBoundingClientRect();
|
||||
const x = ((rect.left + (this.source.offsetWidth / 2)) - (300 / 2)) + window.pageXOffset;
|
||||
const x = Math.max((rect.left + (this.source.offsetWidth / 2)) - (300 / 2), 6) + window.pageXOffset;
|
||||
const y = rect.top + this.source.offsetHeight + window.pageYOffset;
|
||||
|
||||
this.top = y;
|
||||
@@ -50,6 +50,7 @@ export default Vue.extend({
|
||||
position: absolute;
|
||||
z-index: 11000;
|
||||
width: 500px;
|
||||
max-width: calc(90vw - 12px);
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
Reference in New Issue
Block a user