summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-08-16 18:11:15 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-08-16 18:11:15 +0900
commitc8e93054bcc8555dc9afb198b76ede18f4b354d5 (patch)
tree5c748dcad4e4b9d6d423b17e3298fe54ff57a54e /src/client
parentperf: Improve network request performance (#7636) (diff)
downloadsharkey-c8e93054bcc8555dc9afb198b76ede18f4b354d5.tar.gz
sharkey-c8e93054bcc8555dc9afb198b76ede18f4b354d5.tar.bz2
sharkey-c8e93054bcc8555dc9afb198b76ede18f4b354d5.zip
fix(client): タッチ操作でウィンドウを閉じることができない問題を修正
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ui/_common_/header.vue12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue
index 67bb3abb93..115f70a540 100644
--- a/src/client/ui/_common_/header.vue
+++ b/src/client/ui/_common_/header.vue
@@ -2,7 +2,7 @@
<div class="fdidabkb" :class="{ center }" :style="`--height:${height};`" :key="key">
<transition :name="$store.state.animation ? 'header' : ''" mode="out-in" appear>
<div class="buttons left" v-if="backButton">
- <button class="_button button back" @click.stop="$emit('back')" v-tooltip="$ts.goBack"><i class="fas fa-chevron-left"></i></button>
+ <button class="_button button back" @click.stop="$emit('back')" @touchstart="preventDrag" v-tooltip="$ts.goBack"><i class="fas fa-chevron-left"></i></button>
</div>
</transition>
<template v-if="info">
@@ -20,10 +20,10 @@
</div>
<div class="buttons right">
<template v-if="info.actions && showActions">
- <button v-for="action in info.actions" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" v-tooltip="action.text"><i :class="action.icon"></i></button>
+ <button v-for="action in info.actions" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" @touchstart="preventDrag" v-tooltip="action.text"><i :class="action.icon"></i></button>
</template>
- <button v-if="shouldShowMenu" class="_button button" @click.stop="showMenu" v-tooltip="$ts.menu"><i class="fas fa-ellipsis-h"></i></button>
- <button v-if="closeButton" class="_button button" @click.stop="$emit('close')" v-tooltip="$ts.close"><i class="fas fa-times"></i></button>
+ <button v-if="shouldShowMenu" class="_button button" @click.stop="showMenu" @touchstart="preventDrag" v-tooltip="$ts.menu"><i class="fas fa-ellipsis-h"></i></button>
+ <button v-if="closeButton" class="_button button" @click.stop="$emit('close')" @touchstart="preventDrag" v-tooltip="$ts.close"><i class="fas fa-times"></i></button>
</div>
</template>
</div>
@@ -122,6 +122,10 @@ export default defineComponent({
menu = menu.concat(this.menu);
}
popupMenu(menu, ev.currentTarget || ev.target);
+ },
+
+ preventDrag(ev) {
+ ev.stopPropagation();
}
}
});