incorrect mouse cursor on some view in case view below is TextEditor

116 Views Asked by At
struct Test: View {
    @State var text: String = ""
    
    var body: some View {
        ZStack {
            TextEditor(text: $text)
            
            Rectangle()
                .fill(Color.green)
                .padding()
                
        }.padding(50)
    }
}

Rectangle filled with green color displayed above the TextEditor. But even of this TextEditor changes mouse cursor to another one in case of mouse hovering Rectangle.

Question: Why? And how to fix?

I need:

  • default mouse cursor when I am hovering Rectangle.
  • "text-selectable" cursor on hovering TextEditor.

enter image description here

MacOS: Monteray 12.4 (21F79)

Xcode: 13.3 (13E113)

0

There are 0 best solutions below