[I Have Solution] On iPadOS with a physical keyboard, certain input methods in the editor using codemirror may shift upward #7068
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On IpadOS, when using physical keyboard, certian input methods may shift upward, like this:
This happens because the cursor is in the lower half of the screen.
If the cursor is in the upper half of the screen, the input method is under the cursor, which doesn't have any problem.
I've checked HTML:
So it seems to be CodeMirror's problem, not the editor's. (Or you can say it's iPadOS's problem 🤣) And I've checked your release, and didn't find update about this problem.
I deleted
overflow: hidden;indiv, and setdiv's andtextarea'swidthto100px(in desktoptextarea'swidthis1000px, but I don't know why it's0pxin iPadOS. But if I set it to1000px, there are another problem, but it's not necessary to talk about it right now, because my solution can avoid this problem too) for example, to debug, and found out the reason.The text in
textareaauto wraps, which causes input method on iPadOS to shift upward.So the solution is to disable auto-wrap.
In my editor I just added a css:
This doesn't cause more trouble in desktop, so I think you can fix this problem by adding this to CodeMirror.
It looks like there is already code that either sets a large width or turns of wrapping.
Yet the textarea in your screenshot seems to have neither. Why?
Oh maybe that's because the editor used old version of codemirror.
Thanks for your instruction.
Oh no, I've checked the version, the editor used 5.63.1 which has the code you mentioned too.
I don't know if it's because of iPadOS 16. Both Safari and Firefox has this problem.
I can provide the editor and my project if you need.
The code I pasted should run for every hidden textarea created by the editor. You'll have to debug how, in your case, it ends up creating a textarea with neither a width nor a
wrapattribute.webkitistrue, so the problem is whywidthis not1000px.I'll keep on trying.
Oh, here, in TextareaInput.js, it set ios device to
0px.And I've tried setting
widthto1000px, it works fine too.So both
width: 1000px;andwhite-space: nowrap;works fine.