Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
3.98k stars 609 forks source link

ios 16 bug? suggested words in textearea cannot be read by API #1341

Open datacosmos opened 1 year ago

datacosmos commented 1 year ago

It seems that there were changes in the safari version with the current ios/iPadOS 16.1 (20B82), which leads to problems when trying to get the contents of a textarea via the api.

Description

How to reproduce?

When I fill in some words suggested by the mobile keyboard in a textearea I can't fetch the (auto-)typed content via the api:

See there also the empty "Shadow Content" in the picture

With: $("textarea[name=comment]").trumbowyg('html') I got nothing: however with the follwing bad hack we get the complete content: $('#textarea_comment').closest(".trumbowyg").find(".trumbowyg-editor").html()

What is even stranger:

when I type some letters and then accept the autosuggestion I only get the typed letters, e.g.

Type "w","i" accept suggestion "will" => I get only "wi" and not "will"!

Any ideas how to solve this?

SCR-20221102-icd

Alex-D commented 1 year ago

Anyone else?