Re: AT-SPI standard's management of text objects
Samuel Thibault <[email protected]> Mon, 21 Nov 2016 22:16:03 +0100
| Newsgroups | gmane.comp.gnome.accessibility.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, Ksamak, on Mon 21 Nov 2016 16:00:05 +0100, wrote: > if text and (text.caretOffset >= 0): > offset = text.caretOffset > if offset == text.characterCount: > offset -= 1 So if the string is empty, offset becomes -1, and thus atk duly reports this as bogus. I have added this after: > if offset == 0: > offset = 0 > [x, y, width, height] = text.getCharacterExtents(offset, 0) And now it gets correct results in various gtk2/3, qt5 apps. It however still reproduces in firefox, I'm having a look. Samuel