Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web): Allow setKeyboardForControl with IFrames #5872

Open
darcywong00 opened this issue Nov 2, 2021 · 2 comments
Open

feat(web): Allow setKeyboardForControl with IFrames #5872

darcywong00 opened this issue Nov 2, 2021 · 2 comments
Milestone

Comments

@darcywong00
Copy link
Contributor

Reference: https://stackoverflow.com/questions/69694488/keyman-setdefaultkeyboardforcontrolpelem-keyboard-languagecode-function-is

A user asked asked how to get setDefaultKeyboardForControl to work with an iframe element.

It's currently a system limitation that @mcdurdin says

Seems like a limitation we could fix...

@darcywong00 darcywong00 modified the milestone: A15S17 Nov 2, 2021
@mcdurdin mcdurdin added this to the Future milestone Nov 10, 2021
@jahorton
Copy link
Contributor

As of #7343, we're one step closer to this.

That said, one notable issue with setKeyboardForControl with iframe elements - especially non-design-mode ones - is that they may contain multiple elements. It is technically possible, I believe, to call setKeyboardForControl on each of those elements.

This then raises the question: what should setKeyboardForControl actually do in this scenario? Should it iterate over all of the iframe's internal elements and use setKeyboardForControl on each? This seems the simplest solution.

@mcdurdin
Copy link
Member

setKeyboardForControl should only be used on iframes which are in designmode=true. It's intended for use for a single edit element, whether that is an input, textarea, div+contentEditable, or iframe+designMode.

We probably should even test for that and throw if caller attempts to setKeyboardForControl for any non-design-mode iframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants