fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.28k stars 117 forks source link

Doesn't work on fields inside iframes #75

Closed lsloan closed 3 years ago

lsloan commented 8 years ago

GhostText for Chrome doesn't recognize textarea elements shown in the result pane of JSFiddle pages. For example, I've made this very simple JSFiddle that contains HTML which makes a form with a textarea element, no JavaScript, and no CSS:

https://jsfiddle.net/lsloan/1a2nywf0/

Even when the textarea element in the results pane already has focus, activating GhostText on that page shows the message:

There are multiple text areas on this page. Click on the one you want to use.

GT only acknowledges clicks on the textarea elements associated with the other panes for HTML, JavaScript, or CSS. Nothing happens when the textarea element in the result pane is clicked.

A similar thing happens when viewing the embedded version of this JSFiddle, showing only the result tab:

https://jsfiddle.net/lsloan/1a2nywf0/embedded/result/

Whether the textarea element has focus, activating GT shows this message (in red):

No text area elements on this page

I have several extensions installed in Chrome. However, I successfully reproduced the same problem in a new profile that had only the GT extension installed.

I'm using:

Note that the interface with Vim works well enough and doesn't seem to be the problem in this case. I've been successful in getting GT to open Vim documents with the contents of textarea elements on other web pages.

fregante commented 8 years ago

Thanks for the detailed report. This is a known issue, GT doesn't look for text boxes inside iframes at this moment

sloanlance commented 8 years ago

Sorry for the dupe. If you'd like to reference this issue from the other and close this issue, I won't mind.

I guess that's #69 which seems pretty specific. We could instead generalize this issue to be about iframe.

fregante commented 5 years ago

Try this out! https://github.com/GhostText/GhostText/pull/122