eeditiones / tei-publisher-app

The main TEI Publisher app
https://teipublisher.com
GNU General Public License v3.0
63 stars 32 forks source link

Annotation editor: getSelection fails in firefox and safari #62

Open wolfgangmm opened 3 years ago

wolfgangmm commented 3 years ago

Probably only Chrome requires shadowRoot.getSelection.

image

wolfgangmm commented 3 years ago

Fixed by https://github.com/eeditiones/tei-publisher-components/commit/417ba83598b733f3cf743db0f372e6dbc7f7d4cd

wolfgangmm commented 3 years ago

Safari reports the selection on the entire outer div:

image

Note that the selection is reported as collapsed, even though text was selected.

wolfgangmm commented 3 years ago

On further investigation it looks like this is a known safari issue: https://bugs.webkit.org/show_bug.cgi?id=163921. I guess it would be ok to just show Safari users a warning that annotations require either chrome or firefox.