adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.27k stars 7.64k forks source link

Live preview html not updating with <script> tag in body #11687

Open tomellwood opened 8 years ago

tomellwood commented 8 years ago

Hi,

I've read through the troubleshooting guide and it mentions that you have to manually refresh the browser if you have embedded JavaScript - but I can't see any mention of Live Preview not working just when <script> tags are included to pull in external JavaScript files.

Do you have to manually refresh the browser if any <script> tags are used at all?

kameronahler commented 8 years ago

Posting here rather than opening new issue. I am experiencing this problem running 1.6.0-16680.

In particular, I have narrowed the problem down to prism.js, both locally and externally (cdn). This script is the only one that messes live preview up, whereas using jQuery, modernizr, and other various polyfills does not affect live preview.

For me, with the script included, editing html results in live preview doubling the dom element being edited without css styling. The duplicate is updated, whereas the original remains unchanged, unless you refresh.

kameronahler commented 8 years ago

Also, it does not matter where the script is placed for me, either in head or body