mozilla / brackets

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

Console error when editing CSS using the inline CSS widget #118

Closed AJDBenner closed 9 years ago

AJDBenner commented 9 years ago

If you open the inline CSS widget for a HTML element with CSS applied to it and edit the CSS in the widget you get this console error. screen shot 2015-03-19 at 4 17 59 pm screen shot 2015-03-19 at 4 18 42 pm

humphd commented 9 years ago

My strong suspicion is that we're running this through the slowparse/htmlhint stuff, and the DOM is different enough to cause things to break. Can you try disabling the HTMLHint extension and see if you can reproduce?

AJDBenner commented 9 years ago

When reproducing this error with HTMLHinter turned off you still receive the "data-brackets-id=1 not found" error

sedge commented 9 years ago

@AJDBenner Does that cause any functionality to break?

humphd commented 9 years ago

That's probably another issue related to things moving around in the preview DOM, and not finding elements to highlight--I wouldn't read it as part of the other error. Note, too, that in your screenshot above, the errors are coming from two different pages: the errorDisplay.js is in the editor, and the other ones are within a blob URL, meaning it's running in the preview.

So eliminating the HTMLHint makes this go away?

AJDBenner commented 9 years ago

Eliminating the HTMLHint makes the "Uncaught TypeError" go away, but the "data-brackets-id=1 not found" error still remains. It doesn't seem to break anything in the live preview though.

AJDBenner commented 9 years ago

Actually, I'm mistaken. After changing the CSS in the widget, if you close the widget and click on the <p> tag element this error is displayed.

screen shot 2015-03-20 at 10 09 55 am

If you try to change the content within the <p> tag after this error the live preview is broken and displays this error.

screen shot 2015-03-20 at 10 12 41 am

humphd commented 9 years ago

Moving out of PPP

AJDBenner commented 9 years ago

This issue is filed upstream, but it seems to act differently with upstream than with Bramble. https://github.com/adobe/brackets/issues/10773

K-LV commented 9 years ago

@AJDBenner I can't get this error to reproduce in our latest bramble code. Can you confirm?

AJDBenner commented 9 years ago

It still reproduces for me.

STR:

K-LV commented 9 years ago

I see. I was testing using an external style sheet. So it appears the issue is only present using internal CSS.

AJDBenner commented 9 years ago

I have filed this bug upstream https://github.com/adobe/brackets/issues/10773

sedge commented 9 years ago

This is no longer occuring.