utopia icon indicating copy to clipboard operation
utopia copied to clipboard

Code highlight is sometimes broken inside expression blocks

Open liady opened this issue 1 year ago • 0 comments

Describe the bug When there are multiple JSX elements inside an expression block the code highlight doesn't always match the selection and the canvas

To Reproduce Use this code for storyboard.js:

import * as React from 'react'
import { Storyboard } from 'utopia-api'

export var storyboard = (
  <Storyboard>
    {
      <>
        <View />
        <View />
        <View />
      </>
    }
  </Storyboard>
)

function View({ title = 'x', bool }) {
  return <div>{title}</div>
}

Select differentView elements from the navigator, the code highlight doesn't always match

Expected behaviour The code highlight should match the selection

Screenshots Image

liady avatar Apr 22 '24 10:04 liady