Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

iframe element is breaking live CSS loading #7935

Closed
ab7 opened this issue May 25, 2014 · 13 comments
Closed

iframe element is breaking live CSS loading #7935

ab7 opened this issue May 25, 2014 · 13 comments

Comments

@ab7
Copy link

ab7 commented May 25, 2014

After several hours of trying to figure out why my stylesheet was no longer updating in live dev, I narrowed it down to an embedded youtube iframe element. When the video is removed and the live session reset, everything works normally again. But when added, css is not updated and the color picker freezes resulting in many of these errors:

Uncaught TypeError: Cannot read property 'styleSheetId' of undefined
Assertion failed: Style Sheet for document not loaded: http://127.0.0.1:49871/main.css

Here is a screenshot of the error link.
screen shot 2014-05-25 at 12 46 47 pm

The source code I used to find out the problem was simply an html file with an <h1> and <iframe> element and a css file with only one color declaration on the <h1> element. I can provide the full source if necessary.

Brackets version: Sprint 39
OS: Mac 10.9.3 Mavericks
No extensions

@ichibangaijin
Copy link

Wow, good find. I have been struggling with this all weekend.

@risq
Copy link

risq commented May 27, 2014

Thanks too, I had the same problem due to a Google Maps iframe. Simply resolved by commenting out the iframe :) Any fix planned ?

@ab7
Copy link
Author

ab7 commented May 27, 2014

Yeah, for now I've left the iframe videos out while I work. I'm setting up the dev environment to see if I can investigate a bit more.

@marcelgerber
Copy link
Contributor

Ah, I've seen the same thing while working on YouTube modals for brackets.io and wondered what could have caused this error message. Nice find.

@njx njx self-assigned this Jun 2, 2014
@njx njx added this to the Release #41 milestone Jun 2, 2014
@njx
Copy link

njx commented Jun 2, 2014

Medium priority to me for Release 41

@MarcoEsprimia
Copy link

I Love you man. I've been freaking out for 2 whole days after this.

Btw any of you guys having any problems with @font face or google web fonts?

Again, Thank you SO MUCH @ab7

@ab7
Copy link
Author

ab7 commented Jun 12, 2014

No problems with over here with fonts, google or face.

In relation to the iframe problem, I did find that if you switch back and forth between the css file and another file it does reload the changes you made to the css file.

I spent a bit of time looking over the brackets code and I'm excited to see the solution to this bug!

@peterflynn
Copy link
Member

Note: this can happen in non-obvious ways if you're using a JS library that creates iframes dynamically (e.g. Twitter or FB widgets, or in-page ads).

@njx njx assigned dangoor and redmunds and unassigned njx and dangoor Jul 9, 2014
@njx
Copy link

njx commented Jul 9, 2014

Reassigning to @redmunds, who's reviewing #8144 which should fix this.

@genericandy
Copy link

Just encountered this one myself. nice work figuring out the source. I was able to comment out the iframe for now during my development cycle

@techsin
Copy link

techsin commented Jul 16, 2014

same issue but no iframe...just added favicon and then it stopped working found out same error and even after removing only html is updating not css.

@peterflynn
Copy link
Member

@techsin Please file a new issue, since that does not sound related to this one. If you're able to boil down your code to a simple test case where HTML updating still does not work, please provide the code -- that's the fastest way we'd be able to investigate the problem. Thanks!

@redmunds redmunds modified the milestones: Release 0.43, Release 0.42 Jul 18, 2014
@redmunds
Copy link
Contributor

redmunds commented Aug 6, 2014

@ab7 @ichibangaijin @genericandy This was fixed in pull request #8144 for Release 0.43.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests