danhper / atomic-chrome

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

Frame support? #11

Closed pixelchutes closed 8 years ago

pixelchutes commented 8 years ago

Almost embarrassed opening this issue (don't judge!) :smile:

In testing this against a legacy application (using <frameset>) it did not seem to work. However, when testing directly against the target page of the <frame src>, it worked as expected.

I'm not familiar with Chrome plugin development, perhaps this is a known limitation? (e.g. frame support)

danhper commented 8 years ago

Hi, thanks for reporting! Wow, I wonder when was the last time I heard of frame and frameset :smile: I have no idea of what could be the issue, but I will take a look! Is the plugin is outputting something to your console?

pixelchutes commented 8 years ago

Yes, the console output is:

Atomic Chrome does not support <frame> (yet?) content-script.js:1

danhper commented 8 years ago

Thank you for the details, I am going to check it out!

danhper commented 8 years ago

@pixelchutes This should be fixed as of 0.2.1. document.activeElement indeed returns the frame, and not the textarea or whatever, causing the issue.

I updated to get the activeElement inside the frame, when the current one is a frame. Keep in mind that this will not work for cross domain frames, as AFAIK there is no way to access the underlying document.

Please reopen if you are still having issues!

Thank you!

pixelchutes commented 8 years ago

Confirmed! Thanks @tuvistavie (especially for the quick turnaround!)