Repository: vscode
Issue: Emmet wrapWithAbbreviation expands the selection when used within JSX attributes
Labels: bug,emmet,emmet-parse


Issue Type: <b>Bug</b>

Say I want to wrap for example the word "field" in an `<em>` tag, in the following code:
```ts
<Form.Field
  label="Override icon color"
  tooltip={
    <>
      <p>
        Tooltip explanation about field.
      </p>
      <p>
        Another tooltip paragraph.
      </p>
    </>
  }
>
    <BaseInput
      type="color"
      value={color ?? ''}
      onValueChange={setColor}
    />
</Form.Field>
```
 1. I first select the word "field"
 2. I then trigger the `editor.emmet.action.wrapWithAbbreviation` command.

What happens then, is that the "Enter abbrevition" dialog comes up as expected, _but_ the selection for also expands to include the _whole_ `Form.Field` element, from opening tag to end tag.

![GIF 01 08 2022 22-38-29](https://user-images.githubusercontent.com/142162/182242879-7c58689a-6749-410a-ba5a-9ada4934d72c.gif)


This is very annoying, as it makes it impossible to use the `wrapWithAbbreviation` command in this case. The same seems to happen if I for example select `type="color"`, or anything else in a tag "declaration". In SublimeText, the "wrap with tag" functionality just works with whatever you have selected, and it's 100% stable. Emmet shouldn't care _what_ I have selected, it should simply wrap what I _have_ selected with the tag that I want.

VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|31.81GB (14.04GB free)|
|Process Argv|--crash-reporter-id 47d2206c-d1f8-40a4-b941-509da096d920|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (37)</summary>

Extension|Author (truncated)|Version
---|---|---
better-comments|aar|3.0.2
vscode-sqlite|ale|0.14.1
preview-pdf|ana|1.0.0
vscode-intelephense-client|bme|1.8.2
vscode-tailwindcss|bra|0.8.6
npm-intellisense|chr|1.4.2
hex-to-rgba|dak|1.0.0
vscode-eslint|dba|2.2.6
search|dba|2.0.4
githistory|don|0.6.19
xml|Dot|2.5.1
EditorConfig|Edi|0.16.4
vscode-npm-script|eg2|0.3.28
vsc-material-theme|Equ|33.2.0
prettier-vscode|esb|9.5.0
headwind|hey|1.7.0
composer|ika|0.8.0
vscode-text-pastry|jkj|1.3.1
svg|joc|1.4.19
vscode-styled-components|jpo|1.7.0
sftp|lix|1.12.10
ecdc|mit|1.8.0
csharp|ms-|1.25.0
remote-ssh|ms-|0.84.0
remote-ssh-edit|ms-|0.80.0
remote-wsl|ms-|0.66.3
vsliveshare|ms-|1.0.5667
abracadabra|nic|6.15.3
material-icon-theme|PKi|4.19.0
prisma|Pri|4.1.0
vscode-sort-json|ric|1.20.0
vscode-sanity|san|0.1.4
mdx|sil|0.1.0
datapack-language-server|SPG|3.3.36
lorem-ipsum|Tyr|1.3.1
sort-lines|Tyr|1.9.1
vscodeintellicode|Vis|1.2.22


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vscaat:30438848
pylanb8912:30529769
vsclangdc:30486549
c4g48928:30535728

```

</details>

<!-- generated by issue reporter -->