From 0a7569bfd1f503b77e42a573842fa52cda6c297b Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Fri, 28 Aug 2020 17:22:32 +0000 Subject: [PATCH] Bug 1655784 - Return correct collapsed selection range on inputs. r=morgan Differential Revision: https://phabricator.services.mozilla.com/D88502 --- accessible/mac/mozTextAccessible.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accessible/mac/mozTextAccessible.mm b/accessible/mac/mozTextAccessible.mm index 00ce038bb45f..8197c197fccf 100644 --- a/accessible/mac/mozTextAccessible.mm +++ b/accessible/mac/mozTextAccessible.mm @@ -194,7 +194,7 @@ inline NSString* ToNSString(id aValue) { textAcc->SelectionBoundsAt(0, &start, &end); } else { start = textAcc->CaretOffset(); - start = start != -1 ? start : 0; + end = start != -1 ? start : 0; } } } else { @@ -204,7 +204,7 @@ inline NSString* ToNSString(id aValue) { proxy->SelectionBoundsAt(0, data, &start, &end); } else { start = proxy->CaretOffset(); - start = start != -1 ? start : 0; + end = start != -1 ? start : 0; } }