Bug 1248408 - Preserve text from previous a11y event if new event does not provide any. r=mfinkle
authorEitan Isaacson <eitan@monotonous.org>
Thu, 31 Mar 2016 13:46:14 -0700
changeset 291072 41c11b33eedb73985d93e3ca63a3bb5c20a8d8ab
parent 291071 5ba4fe816a3980fd20f3e3ffc92f6e714ce91d88
child 291073 b73ce1b4482c7d19ee44cd29ab114b14956cc75b
push id74443
push usereisaacson@mozilla.com
push dateFri, 01 Apr 2016 00:11:00 +0000
treeherdermozilla-inbound@41c11b33eedb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1248408
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1248408 - Preserve text from previous a11y event if new event does not provide any. r=mfinkle MozReview-Commit-ID: 3hIquiKLvl7
mobile/android/base/java/org/mozilla/gecko/GeckoAccessibility.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoAccessibility.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoAccessibility.java
@@ -203,18 +203,18 @@ public class GeckoAccessibility {
 
             final JSONArray textArray = message.optJSONArray("text");
             StringBuilder sb = new StringBuilder();
             if (textArray != null && textArray.length() > 0) {
                 sb.append(textArray.optString(0));
                 for (int i = 1; i < textArray.length(); i++) {
                     sb.append(" ").append(textArray.optString(i));
                 }
+                sVirtualCursorNode.setText(sb.toString());
             }
-            sVirtualCursorNode.setText(sb.toString());
             sVirtualCursorNode.setContentDescription(message.optString("description"));
 
             JSONObject bounds = message.optJSONObject("bounds");
             if (bounds != null) {
                 Rect relativeBounds = new Rect(bounds.optInt("left"), bounds.optInt("top"),
                                                bounds.optInt("right"), bounds.optInt("bottom"));
                 sVirtualCursorNode.setBoundsInParent(relativeBounds);
                 int[] locationOnScreen = new int[2];