Skip to content

[List Implementation] iOS 8 -- When a bulleted list goes off the page, the text view scrolls from the top after hitting enter #52

Open
@Deadpikle

Description

@Deadpikle

Hi,

In iOS 8, hitting enter (return) in a bullet list at the bottom of the text does not scroll properly to the bottom of the text view (i.e. to self.selectedRange) but instead scrolls from the top of the text view to the bottom.
In iOS 7.1, you can get rid of scrolling issues by utilizing the scrolling fixes in PSPDFTextView ( https://github.com/steipete/PSPDFTextView )
In iOS 8, however, when the attributedText is changed in richTextEditorToolbarDidSelectBulletList, the UITextView scrolls from the top to the self.selectedRange, which technically works for the user, but it is super ugly as it scrolls from top to bottom every time you hit enter to continue the bullet list. I am fairly certain that the problem lies with setting self.attributedText when adding a bullet, but I could be wrong.

In iOS 8, I have tried not inheriting from PSPDFTextView and instead "fixing" the cursor issue myself by adding:
[self scrollRangeToVisible:self.selectedRange];
to textViewDidChangeSelection.
This does "fix" the issue where UITextViews don't scroll down properly when the user hits enter at the end of the UITextView (regardless of whether you're in a list or not), but the weird scroll from top to bottom issue still remains.

You can replicate this in the demo application.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions