Hi James,
Thanks for the comment.
Let me confirm I understand your comment.
The suggestion list which is rendered in your comment, is not for custom
rendering of
suggestions from IME, but those from a web service (e.g. Google Suggest).
So the intention of that example is a use of setExclusionRectangle() to
give IME hint
about where the web suggestion region is rendered, and let IME try to avoid
that
region if it wants to show any UI element overlapping that area otherwise.
It would be nice if platforms (OSX, Windows, Linux...) provide ways to
* tell IME to suppress showing UI elements (especially suggestion UI during
composition)
* get signals from IME whenever it shows/hides any UI element (and
cancelable, if possible)
but there are no platform APIs in common.
I haven't explored accessibility feature on OSX, but does it provide any of
the above?
As far as I know NSTextInputClient does not provide them.
On Sat, Aug 17, 2013 at 3:39 AM, James Craig jcr...@apple.com wrote:
On Aug 16, 2013, at 5:44 AM, Arthur Barstow art.bars...@nokia.com wrote:
You may recall WebApps and PFWG discussed WebApps' Input Method Editor
API last April ([Mins]). As such, I wanted to let you know a new WD of that
spec was published on August 15:
http://www.w3.org/TR/2013/WD-ime-api-20130815/
If you have any comments, please send them to the public-webapps @
w3.org list.
-Regards, ArtB
[Mins] http://www.w3.org/2013/04/25-webapps-minutes.html#item12
This draft is much improved, but I still have one concern:
This code sample makes it clear you intend to do custom rendering of the
suggestions list…
// Render new suggeston list.
for (i = 0; i candidates.length; i++) {
suggest.appendChild(document.createElement('li'));
suggest.childNodes[i].textContent = candidates[i];
}
But it's not apparent to me how you're alerting the user agent to avoid
rendering the native candidate suggestions. It's also not clear to me how,
depending on user preference, the user agent would respond to let the web
application know that custom rendering is not allowed in this context or
for this user.
I'd expect something like this conditional to confirm with the UA that
it's okay for the web app to do custom rendering of the candidates.
// check with the UA to see if web app can render custom suggestions list
if (target.inputMethodContext.preventDefaultRendering()) {
// Render new suggeston list.
for (i = 0; i candidates.length; i++) {
suggest.appendChild(document.createElement('li'));
suggest.childNodes[i].textContent = candidates[i];
}
} // else custom rendering is disallowed by the UA
--
Takayoshi Kochi