HaloWordApp / haloword

English–Chinese dictionary app for Chrome with over 30,000 users

Home Page:https://chrome.google.com/webstore/detail/halo-word-dictionary/bhkcehpnnlgncpnefpanachijmhikocj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shouldn't show when press Cmd+C etc..

aquarhead opened this issue · comments

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Do you mean the instant query pops up when pressing Cmd + C?

@marknv: Yeah and sometimes the query is triggered when using Cmd + click to open link.

@xhacker Hi bro,

Please check lookup.js (line: 159), if (!e.ctrlKey && !e.metaKey), the metaKey is cmd key in mac.

However, personally I don't think it is a bug, since:

  1. In mac, an instant query is triggered when you press cmd or ctrl, and highlight certain text (by dragging or double clicking) at the same time. Only if you double click that link, which may cause highlighting the link text (I do not have this problem), then a query will be triggered.
  2. Ctrl + left click in mac equals to right click, so it is much more convenient to use cmd key in mac. Therefore, please do use both ctrlKey and metaKey.

@marknv: Hi,

Just checked the code, got the problem. Please try: first select a word, then Cmd + click a link. This will trigger unexpected query.

I have two ideas, first is to use option key on Mac. Second is to detect whether the user is pressing modifier key on mouse down. If negative, ignores further mouse up event.

@aquarhead: Could you provide detailed steps to reproduce the Cmd + C issue?

@xhacker it triggers randomly (could be my computer's problem