Skip to content

Emmet: Select next/previous item does not work with script tag. #118842

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

Merged
merged 5 commits into from
Apr 1, 2021
Merged

Emmet: Select next/previous item does not work with script tag. #118842

merged 5 commits into from
Apr 1, 2021

Conversation

vinku
Copy link
Contributor

@vinku vinku commented Mar 12, 2021

This PR fixes #113515

Issue: Emmet select does not work with html script tags.

Reason: The reason is that the html subtree corresponding to the script tag is not generated and as a result, emmet does not select into the script tag.

Fix: Whenever we are fetching the HTML node corresponding to a position, if we end up in fetching a script tag, then we would set up the the script node subtree and then again fetch the HTML node corresponding to the same position. This way we would be able to parse/select contents which are child of the <script> tags.

Validations: Verified that the scenario mentioned in the tag is working after these changes + other manual verification of select next/previous item.

@rzhao271 rzhao271 added this to the March 2021 milestone Mar 18, 2021
@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues labels Mar 18, 2021
@rzhao271 rzhao271 modified the milestones: March 2021, April 2021 Mar 22, 2021
Copy link
Collaborator

@rzhao271 rzhao271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rzhao271 rzhao271 merged commit a56afa9 into microsoft:main Apr 1, 2021
@vinku vinku deleted the SelectItemScriptTagEmmet branch April 1, 2021 17:36
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emmet Select Item does not select into script tags
2 participants