[orca] If the line contents start with a newline char, remove the newline char
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] If the line contents start with a newline char, remove the newline char
- Date: Fri, 24 Jan 2020 22:53:41 +0000 (UTC)
commit c25131f4de2226428f141ecf3b64de25f180c8e7
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Fri Jan 24 17:49:25 2020 -0500
If the line contents start with a newline char, remove the newline char
Some user agents report the newline character shares the same bounding
box as the contents which follow on the same line. We don't want to
present that newline character. Also setting the caret at that point
typically places it at the end of the previous line rather than at the
beginning of the line we're about to present.
src/orca/scripts/web/script_utilities.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index ccd048ee1..acaac039f 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1671,6 +1671,10 @@ class Utilities(script_utilities.Utilities):
nextObj, nOffset = self.findNextCaretInOrder(lastObj, lastEnd - 1)
+ firstObj, firstStart, firstEnd, firstString = objects[0]
+ if firstString == "\n" and len(objects) > 1:
+ objects.pop(0)
+
if useCache:
self._currentLineContents = objects
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]