Re: proposal: add input/keyboard locale to text and keyboard events [ISSUE-119]

2010/9/14 Aharon (Vladimir) Lanin <aharon@google.com>:
> Perhaps it should then be redefined as .lastInputLocale, indicating the
> locale of the last text input device to have generated input. But then if
> the last text event was due to a paste operation, would it become null? If
> yes, then the input locale is no longer available outside the scope of
> events until the next time there is input. And if no, then during the
> paste's text event its value would be misleading (it has nothing to do with
> the pasted text). I guess it could become null during the paste text event,
> and then go back to the last non-null value after the event is over, but
> this is getting a little complicated.
> What's wrong with putting the value right in the event, where the is no
> possible ambiguity?
> Mind you, I agree that having the input locale available outside the scope
> of events would indeed be useful too. Perhaps (some global
> object).lastInputLocale should be made available in addition to inputLocale
> in the events. It would get updated on every text and keyboard event with a
> non-null inputlocale.

Actually, there's a good argument for not exposing inputLocale outside
of text/keyboard events. If it is required that the user interact with
the page before exposing locale, then this reduces the ability to
fingerprint the user.

/ Jonas

Received on Tuesday, 14 September 2010 15:15:29 UTC