Grand Robert and Robert & Collins: Tip to fix the double-click behaviour in the search field

Posted by Pierre Igot in: French Stuff, Macintosh
May 21st, 2012 • 11:47 am

Nearly three years ago, I wrote (in French) about the absurd design of the user interface for the Grand Robert and Robert & Collins CD-ROM-based dictionary applications, which uses the double-click as a shortcut from jumping from entry to entry in the dictionary, whereas the universal convention in OS X is that a double-click on a word selects that word.

The absurdity is such that this double-click behaviour extends even to the search field itself, when double-clicking on what you’ve typed in the field not only selects it, but also causes the dictionary to attempt to jump to the corresponding entry. Of course, if you’ve typed an incomplete word or made a spelling mistake and want to select the word to type over it, this behaviour is utterly maddening, especially in the Grand Robert application, where you get a modal dialog box telling you that the word you’ve just clicked on is not an entry in the dictionary. (Doh!) You also get such a modal dialog if the word you clicked on exists in the dictionary, but has more than one corresponding entry. Argh!

At the time, I also sent a link to my article to the Robert developers, and actually got a response back, full of outrage and shock that I would dare question their wonderful user interface that so many of their users love. After a bit of back-and-forth, I did manage to get them to admit that, while the double-click behaviour in dictionary entries was debatable, this same behaviour in the search field itself was completely nonsensical. They then told me that they would address the issue in a future update.

They never did. Three years later, it still happens to me all the time. I double-click on something in the search field to select it, and the Grand Robert or the Robert & Collins application selects it and proceeds to attempt to jump to the corresponding entry in the dictionary.

Then ten days ago I wrote about an unrelated issue introduced in the Grand Robert application by the latest OS X update (10.7.4). I wrote two subsequent articles, one about the fact that the Grand Robert developers had acknowledged the problem and promised a fix (still not there) and another one about a temporary workaround provided by Betalogue reader and fellow Grand Robert user Yoto Yotov.

In fact, in his e-mails M. Yotov went beyond that and also got back to me about the other outstanding issue with the double-click, which presumably he read about by exploring my older blog posts on the product. And here again, he offered a fix for the problem. Since the Grand Robert application is based on HTML and JavaScript, he found that the following works:

1. Use “Show Package Contents” on Grand Robert application.

2. Browse to “/web/js” folder and open file called “main.js” in text editor. (I used BBEdit.)

3. In the file, replace:

function ShowSelectedWord()
{

with

function ShowSelectedWord(event)
{
	if (event.element() == $('inputText')) return false;

4. Save and close the file and relaunch the Grand Robert application.

This indeed breaks the unwanted double-click behaviour in the search field. Brilliant!

It does not break it elsewhere in the interface, meaning that you can still double-click on a word in the current entry to jump to the entry for the word. If you just want to select a word in an entry, you need to right-click on it. (But you cannot right-click-and-drag to extend the selection. If you want to select more than one word, you need to use a simple click-and-drag without double-clicking. So you cannot extend a selection word by word, only character by character. Besides, there is little point in attempting to do this, because even if you create a selection range like this, when you use the “Copy” command in the “Edit” menu, the Grand Robert application ignores your selection and puts the entire entry in the Clipboard.)

Once I got this fix working in the Grand Robert application, I tried to find out if the same would also work in the Robert & Collins application. It too suffers from the unwanted behaviour with double-clicks in the search field, but at least there the dialogs are not modal, which means that it is slightly less annoying. But it still would be nice to be able to fix it.

Well, if you do “Show Package Contents” on the Robert & Collins application, you will also find a “/web/js” folder with a file called “main.js”. But it does not work with the exact same line of JavaScript. Instead you need to replace:

function ShowSelectedWord()
{

with

function ShowSelectedWord(event)
{
	if (event.element() == $('inputEntry')) return false;

(The internal name of the search field is obviously different.)

Again, save and close, and relaunch the Robert & Collins application. Now double-clicks on words in the search field no longer cause the application to try and jump to the corresponding dictionary entry.

Thanks again to Yoto Yotov for his help!


Comments are closed.