Index: src/orca/Gecko.py
===================================================================
--- src/orca/Gecko.py	(revision 3014)
+++ src/orca/Gecko.py	(working copy)
@@ -4547,7 +4547,8 @@
             caretOffset = text.caretOffset
             singleLine  = obj.state.count(
                 atspi.Accessibility.STATE_SINGLE_LINE)
-            if length == 0:
+            if length == 0 \
+               or ((length == 1) and (text.getText(0, -1) == "\n")):
                 weHandleIt = True
             elif caretOffset <= 0:
                 weHandleIt = keyboardEvent.event_string \
@@ -6033,7 +6034,7 @@
         if obj.text and obj.text.characterCount \
                     and not self.isAriaWidget(obj=obj):
             unicodeText = self.getUnicodeText(obj)
-            if startOffset == -1:
+            if (startOffset == -1) or (startOffset > len(unicodeText)):
                 startOffset = len(unicodeText)
             previousOffset = startOffset - 1
             if previousOffset >= 0:
@@ -6519,10 +6520,11 @@
         """
         if obj and obj.text and obj.text.characterCount:
             unicodeText = self.getUnicodeText(obj)
-            return unicodeText[characterOffset].encode("UTF-8")
-        else:
-            return None
+            if characterOffset < len(unicodeText):
+                return unicodeText[characterOffset].encode("UTF-8")
 
+        return None
+
     def getWordContentsAtOffset(self, obj, characterOffset):
         """Returns an ordered list where each element is composed of
         an [obj, startOffset, endOffset] tuple.  The list is created

