Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] [Core][Live Preview HTML changes]: Incorrect behavior when live preview non-dafault sample HTML changes. #4763

Open
core-ai-bot opened this issue Aug 29, 2021 · 7 comments

Comments

@core-ai-bot
Copy link
Member

Issue by julieyuan
Thursday Sep 12, 2013 at 09:59 GMT
Originally opened as adobe/brackets#5176


Steps:

  1. Launch Brackets and new a html files.
  2. Save this file and live preview it.
  3. Input some content into the <body> tag, like string "first", and observe the changeson the webpage.
  4. Delete the string "first" character-by character , and obeserve the changes on the webpage.

Result:
The changes on the webpage are wired.
At step3, it previews as "f","f fi" "f fi fir"...while I input "first"
At step4, it doesn't delete the character, actually, it seems to add the string behind the previous strings.

Expected:
it should preview as "first" at step3, and it should only preview the string after deleting at step4.

ENV: MAC10.7 and Win8 English OS
Build: 0.31.0-9414

Notes:
This issue not reproduces to default sample file: index.html.

Snapshots;
Please refer to snapshots for details:
Step3:
3
Step4:
4

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Sep 12, 2013 at 17:38 GMT


High pri to me for sprint 31.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Sep 12, 2013 at 17:47 GMT


Looks like this has been happening since we turned live HTML on in master, so this isn't an injection from the recent changes.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Sep 12, 2013 at 18:53 GMT


I wrote a unit test for this case and it passes, so it's not clear why it fails in the browser (since we test to make sure that RemoteFunctions seems to be doing the right thing as well). Looking into it further.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Sep 12, 2013 at 20:14 GMT


Aha. The issue is that in the actual browser DOM, there's an injected <div> for live highlighting that's screwing things up. I'm guessing we never saw this before because in cases where we were testing typing in an empty document, we would probably first create a tag element and then type text in that, and the tag id would get us to the right place. So this is really specific to text directly inside <body>.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Thursday Sep 12, 2013 at 22:14 GMT


FBNC@julieyuan

@core-ai-bot
Copy link
Member Author

Comment by julieyuan
Friday Sep 13, 2013 at 04:31 GMT


Thanks! Changes has not been merged into latest build 0.31.0-9426. Will check it with next build.

@core-ai-bot
Copy link
Member Author

Comment by julieyuan
Monday Sep 16, 2013 at 05:00 GMT


Fixed in build 0.31.0-9479. So closing it. Here is the snapshot:
screen shot 2013-09-15 at 9 57 42 pm

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

No branches or pull requests

1 participant