Skip to content

Commit f239857

Browse files
committed
fix(electron): should not show context menu if there is no typos (#8895)
fix AF-1794
1 parent 6e25243 commit f239857

File tree

1 file changed

+6
-0
lines changed
  • packages/frontend/apps/electron/src/main/windows-manager

1 file changed

+6
-0
lines changed

packages/frontend/apps/electron/src/main/windows-manager/tab-views.ts

+6
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,12 @@ export class WebContentViewsManager {
836836

837837
if (spellCheckSettings.enabled) {
838838
view.webContents.on('context-menu', (_event, params) => {
839+
const shouldShow =
840+
params.misspelledWord && params.dictionarySuggestions.length > 0;
841+
842+
if (!shouldShow) {
843+
return;
844+
}
839845
const menu = new Menu();
840846

841847
// Add each spelling suggestion

0 commit comments

Comments
 (0)