diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 51a82a32b9..a927d108bb 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -705,6 +705,7 @@ apply: "適用"
receiveAnnouncementFromInstance: "インスタンスからのお知らせを受け取る"
emailNotification: "メール通知"
inChannelSearch: "チャンネル内検索"
+useReactionPickerForContextMenu: "右クリックでリアクションピッカーを開く"
_email:
_follow:
diff --git a/src/client/components/note-detailed.vue b/src/client/components/note-detailed.vue
index 1108bd2c27..434dd56ba3 100644
--- a/src/client/components/note-detailed.vue
+++ b/src/client/components/note-detailed.vue
@@ -756,7 +756,13 @@ export default defineComponent({
};
if (isLink(e.target)) return;
if (window.getSelection().toString() !== '') return;
- os.contextMenu(this.getMenu(), e).then(this.focus);
+
+ if (this.$store.state.useReactionPickerForContextMenu) {
+ e.preventDefault();
+ this.react();
+ } else {
+ os.contextMenu(this.getMenu(), e).then(this.focus);
+ }
},
menu(viaKeyboard = false) {
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index d532289857..24c374869d 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -731,7 +731,13 @@ export default defineComponent({
};
if (isLink(e.target)) return;
if (window.getSelection().toString() !== '') return;
- os.contextMenu(this.getMenu(), e).then(this.focus);
+
+ if (this.$store.state.useReactionPickerForContextMenu) {
+ e.preventDefault();
+ this.react();
+ } else {
+ os.contextMenu(this.getMenu(), e).then(this.focus);
+ }
},
menu(viaKeyboard = false) {
diff --git a/src/client/components/ui/modal.vue b/src/client/components/ui/modal.vue
index 69a83e002c..405fa4aaa5 100644
--- a/src/client/components/ui/modal.vue
+++ b/src/client/components/ui/modal.vue
@@ -70,6 +70,7 @@ export default defineComponent({
// TODO: ResizeObserver無くしたい
new ResizeObserver((entries, observer) => {
const rect = this.src.getBoundingClientRect();
+
const width = popover.offsetWidth;
const height = popover.offsetHeight;
diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue
index 0e741d474c..90ff3e2c20 100644
--- a/src/client/pages/settings/general.vue
+++ b/src/client/pages/settings/general.vue
@@ -19,6 +19,7 @@
{{ $ts.behavior }}
{{ $ts.openImageInNewTab }}
{{ $ts.enableInfiniteScroll }}
+ {{ $ts.useReactionPickerForContextMenu }}
{{ $ts.disablePagesScript }}
@@ -144,6 +145,7 @@ export default defineComponent({
chatOpenBehavior: ColdDeviceStorage.makeGetterSetter('chatOpenBehavior'),
instanceTicker: defaultStore.makeGetterSetter('instanceTicker'),
enableInfiniteScroll: defaultStore.makeGetterSetter('enableInfiniteScroll'),
+ useReactionPickerForContextMenu: defaultStore.makeGetterSetter('useReactionPickerForContextMenu'),
},
watch: {
diff --git a/src/client/store.ts b/src/client/store.ts
index bf042d8ab4..528e563fdd 100644
--- a/src/client/store.ts
+++ b/src/client/store.ts
@@ -144,6 +144,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: true
},
+ useReactionPickerForContextMenu: {
+ where: 'device',
+ default: true
+ },
showGapBetweenNotesInTimeline: {
where: 'device',
default: true
diff --git a/src/client/ui/chat/note.vue b/src/client/ui/chat/note.vue
index f4c9f063dc..4e4a303c36 100644
--- a/src/client/ui/chat/note.vue
+++ b/src/client/ui/chat/note.vue
@@ -741,7 +741,13 @@ export default defineComponent({
};
if (isLink(e.target)) return;
if (window.getSelection().toString() !== '') return;
- os.contextMenu(this.getMenu(), e).then(this.focus);
+
+ if (this.$store.state.useReactionPickerForContextMenu) {
+ e.preventDefault();
+ this.react();
+ } else {
+ os.contextMenu(this.getMenu(), e).then(this.focus);
+ }
},
menu(viaKeyboard = false) {