TextMeshPro multiline InputField scroll issues with PageUp/PageDown keys

Hi pals,

I’m having some issues when scrolling a multiline InputField using PageUp/PageDown keys:

Even if the text doesn’t need to scroll, when pressing PageDown key, the text goes all the way down disappearing from view. Then, when trying to go up again using PageUp, it slowly scrolls up as you can see in the screenshot below:

4431514--404998--InputFieldScroll.gif

I suppose this is a bug, but is there a workaround for this issue? As the source code of TMP isn’t public and the legacy InputField doesn’t support scrolling with PageUp/PageDown keys, I don’t have a clue of what’s going on.

Thanks in advance!

1 Like

Anyone? Am I the only one with this issue?

I’ll try taking a look at this later tonight or over the weekend.

The package manager version of TextMesh Pro include source code. You can access the various scripts by navigating to the Packages folder in the project as seen below.

4449907--407902--upload_2019-4-19_15-24-52.png

Note that changes made there are only done to the local cached version of the package located in the local project’s “Library/PackageCache/…” folder.

Great to know, Stephan!

I know it’s a minor bug, but as I’m making a game that teaches programming, it’s important that the InputField works flawlessly.

Looking forward for a fix!

Thanks!!

Hi! Any news on this issue? Thanks!

I’m having the same issue. I would be content with just being able to disable Page Up/Down in a multi-line input field.

Resurrecting this thread because this is still a reproducible bug, PageUp and PageDown keys still cause a multiline input field to scroll.

However, I have managed to find a temporary solution.
It appears that tapping PageUp or PageDown causes the RectTransform.anchoredPosition to shift on the visible input field, alongside the RectTransform.anchoredPosition of the caret the input instantiates.

The solution is simply to revert their positions when the PageUp and PageDown keys are tapped.

if (Input.GetKeyDown(KeyCode.PageUp) || Input.GetKeyDown(KeyCode.PageDown))
{
        caret.anchoredPosition = Vector3.zero;
        input.anchoredPosition = Vector3.zero;
}