投稿のURLプレビューポップアップを改良 (#6226)
* URLプレビューポップアップを改良 - タッチデバイスでは表示しないように - 幅をレスポンシブに * Use maxTouchPoints to detect touch device * fix
This commit is contained in:
@ -24,6 +24,7 @@ import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { toUnicode as decodePunycode } from 'punycode';
|
||||
import { url as local } from '../config';
|
||||
import MkUrlPreview from './url-preview-popup.vue';
|
||||
import { isDeviceTouch } from '../scripts/is-device-touch';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
@ -92,11 +93,13 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
onMouseover() {
|
||||
if (isDeviceTouch()) return;
|
||||
clearTimeout(this.showTimer);
|
||||
clearTimeout(this.hideTimer);
|
||||
this.showTimer = setTimeout(this.showPreview, 500);
|
||||
},
|
||||
onMouseleave() {
|
||||
if (isDeviceTouch()) return;
|
||||
clearTimeout(this.showTimer);
|
||||
clearTimeout(this.hideTimer);
|
||||
this.hideTimer = setTimeout(this.closePreview, 500);
|
||||
|
Reference in New Issue
Block a user