rjkroege/edwood

Interop correctly with long-press i18n UI

rjkroege opened this issue · 0 comments

MacOS has an i18n feature where long-pressing on a key (e.g. e) that may have diacriticals
in non-English Latin-script languages (e.g. French) will open a popup that lets one choose
the letter with a diacritical version. This doesn't really work as intended in Edwood:

  • the letter appears in Edwood on key-down
  • (simultaneously) the MacOS window appears. It's locaiton is "near" the insertion point
    but not correctly positioned (how did it pick a location?) (It looks like it's at the corner of the
    Window. But how is that communicated to the OS?)
  • click on the letter with a diacritical delivers the letter with the diacritical to the Edwood
    Window now under the mouse cursor.

To fix this:

  • position the popup such that the affordance suggesting insertion is much closer to the
    insertion point
  • the Text target of the insertion popup is noted
  • don't insert a character on key-down.

This concievably is actually a devdraw bug so perhaps can only be fixed with changes there
or use of an alternative (c.f. #205)