Screen is being scrolled if prosemirror is in popup

Hi! I have some strange issue with Prosemirror: I have a Prosemirror editor in popup (body is freezed when popup is opened). So if i use iphone and type something in the editor in this popup, my background page is being scrolled, and popup is being scrolled to the half of it’s height. So after i type any symbol in editor my popup scrolls and i’m able to see only half of it. When i scroll it back and type any symbol again, it’s being scrolled again.

Also i was able to reproduce that on my computer, but only few times, now i’m not able to do that by some reason. But it’s always reproducing on the iphone safari browser…

I tried to remove my custom logic for prosemirror and replace it with this basic setup: https://prosemirror.net/examples/basic/ but anyways, i have the same issue.

Maybe you know, how can i solve this problem? :pray:

Hey @igor, looks like the issue is partially related to font-size of the modal inputs. If you target them and increase the height to 16px, it should prevent it from auto-zooming so far. That being said, that was from a quick google search on the topic.

Source: https://stackoverflow.com/questions/2989263/disable-auto-zoom-in-input-text-tag-safari-on-iphone/16255670

Cheers! :slight_smile:

Hi @DigiBytes. The problem is not in auto-zooming: if i type any character, page and modal is being scrolled (even if modal has no space to scroll it manually…)

I suspect the problem is that ProseMirror’s scroll-into-view logic doesn’t understand absolute or fixed positioning, and thus ends up scrolling the body even though that doesn’t help scroll the visible editor into view. If you could create a minimal setup that displays this problem, I could try to debug it.

@igor did you manage to solve this?

I’m having the same problem. Honestly all I want is to turn off the scroll. That’s good enough for me.

1 Like