danhper / atomic-chrome

Edit Chrome textareas in Atom
https://goo.gl/Et0hwg
MIT License
916 stars 30 forks source link

iframe support #12

Closed wiiittttt closed 8 years ago

wiiittttt commented 8 years ago

It looks like the framework for this was added as a result of #11.

I think there just needs to be another method added?

normalizeIframe(elem) { return normalizeFrame(elem); }

pixelchutes commented 8 years ago

:+1: Yes, please!

danhper commented 8 years ago

Thanks for reporting, this should be fixed in 0.2.3.

pixelchutes commented 8 years ago

@tuvistavie sorry to pester, but when testing 0.2.3 (<textarea> in <frame>), Atomic Chrome is opening up two Atom tabs...

I don't believe this happened in 0.2.2.

Oddly, it does not seem to work for a texteditor like CodeMirror (inside <frame>), but does work for CodeMirror without <frame> involved.

UPDATE:

The two Atom tabs seems to be happening even when <frame> is not involved. I'm going to attempt Restarting Chrome 51.0.2693.2 dev (64-bit) and Atom 1.6.1 seemed to resolve the duplication issue, just not sure why CodeMirror doesn't work inside of a frame?

console log:

Uncaught (in promise) TypeError: Cannot read property 'on' of undefined(…) injected.js:1

value: function(e) {
    this.editor.on("change", this.wrapSilence(e))
           //  ^^ here
}
danhper commented 8 years ago

@pixelchutes Thanks for the catch! I was using the window object instead of the iframe window object, causing the error when working inside in iframe. I just published a fix as 0.2.4, please let me know how it goes!

pixelchutes commented 8 years ago

@tuvistavie Confirmed, thank you! :beers: