xing/wysihtml5 — Issue #9: IE(9): error focusing on hidden element
Author: javan
Created: 2011-12-07 03:33:34+00:00
State: open

Hey there, we're exploring using this editor at 37signals, and I ran into a small issue in IE9. Here's an example test case:

```html

test

```

The problem occurs when using `{ style: true }` on a textarea that's hidden. Here's the resulting error in IE:

```
SCRIPT16389: Incorrect function.

wysihtml5-0.2.0.js, line 6887 character 7
```

The problematic code is here:
https://github.com/xing/wysihtml5/blob/master/src/views/composer.style.js#L64-65

The element responds to `setActive`, but calling it results in the error (presumably because the element is hidden). Removing that condition altogether and relying on the more verbose code below works fine. I'd be happy to provide a pull request to do just that, but wanted to check with you first to see if there's other options.

I'm just a day or two into exploring wysihtml5 and so far it's great! Thanks for your work.