Open godbout opened 2 years ago
some apps fail while some apps work. in my UI Tests i was surprised to see that it was still failing even when i was not selecting a character. on Big Sur my mock Window is a new SwiftUI TextEditor, while on Catalina i use a NSTextView. NSTextView sends back the correct line number, while the new TextEditor do not!
apologies. my bad. it still does fail with the NSTextView.
i'm submitting a video to show the issue. i dump 4 times the line range for an index. 2 times in Xcode, 2 times in TextEdit. the second time in TextEdit, the line range is wrong. the first time is without selecting, the second time is while selecting.
https://user-images.githubusercontent.com/121373/170824467-a26c9077-5c1a-46aa-a495-3a446af3851f.mp4
adding a new video, showing the first character of the line sending back wrong line number when selected
https://user-images.githubusercontent.com/121373/170824544-270161e1-fa75-4889-8bd1-3ac47f0a9348.mp4
i've created a minimal repository to show the issue: https://github.com/godbout/ax-api-big-sur-bug
when select the first character of the line with the keyboard, the value returned by the AX API is correct. but when selected via mouse, trackpad, or if the text selection has been made through the AX API, then it is wrong.
still failing up to macOS Sequoia, 15.1.
Description
i have the following text:
this is another text helloh yes
if the caret is at the beginning of the second line, before the first
h
of "helloh", and with 1 character selected (the first h), Big Sur returns the line range as 0, 21 rather than 21, 28.it works fine if there is no character selected. it works fine also up to Catalina. the issue seems to appear only in Big Sur.