getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

Text selection in text block not possible in macOS Safari #4725

Closed silllli closed 1 year ago

silllli commented 1 year ago

Description

I have a blocks field followed by an email field. If I try to select text inside a text block (which would trigger the context menu to select marks), the selection and context menu are visible for a brief moment, but the cursor focus switches immediately to the following email field.

When I change the email field to a text field the problem is fixed.

There is also no problem when using Google Chrome instead of Safari.

Expected behavior

Select the text inside the text block.

To reproduce

  1. Create a blueprint with a blocks field followed by an email field
  2. Add a text block, write some text and try to select it

Your setup

Kirby Version

3.8.0-rc.2

Console output

None

Your system (please complete the following information)

afbora commented 1 year ago

I'm trying to reproduce the issue.. Your blueprint like that:

fields:
  blocks:
    type: blocks
  email:
    type: email
silllli commented 1 year ago

Exactly. I just copied your code into an empty blueprint and the problem occurs.

Sample video:

https://user-images.githubusercontent.com/9334305/193076103-d222aeb6-840f-411a-8413-88893c4c3f2c.mov

afbora commented 1 year ago

I couldn't reproduce the issue on Windows & Chrome. May be this is related with Safari. I need to ask few questions:

  1. Do you have any plugins?
  2. Do you get any errors on browser console?
silllli commented 1 year ago

Yes, it’s probably related to Safari, already tested that:

There is also no problem when using Google Chrome instead of Safari.

  1. Do you have any plugins?

Only my own, but they don’t do anything in the panel. I just removed them, but the problem remains.

  1. Do you get any errors on browser console?

Console output

None

afbora commented 1 year ago

Thanks for testing 👍 I wonder if this is an existing bug or a regression. For this, it should be tested with 3.7.5.

silllli commented 1 year ago

Not working in 3.7.5 either!

lukasbestle commented 1 year ago

I don't have a machine with Safari 16 at hand but tried to reproduce it in Safari 15.6.1 on macOS 10.15.7. Works as expected there. So maybe it's a bug introduced with Safari 16.

distantnative commented 1 year ago

I'm on macOS 13 with Safari 16.1 - cannot reproduce the issue as described

https://user-images.githubusercontent.com/3788865/193130116-84a48786-1302-4585-839b-10ff323af9f1.mov

lukasbestle commented 1 year ago

@silllli Have you checked the behavior in a fresh Starterkit?

silllli commented 1 year ago

It also happens in a fresh Starterkit—but I think I found the problem: it has to do with the login credential suggestion by Safari (which are shown with the email field). I deleted my saved passwords for localhost and the problem is gone.

Still weird that the suggestions are triggered by clicking in a different field.

Edit: Also weird that in my sample video they are NOT triggered, because there is already something entered in the field, but the bug still occurs.

distantnative commented 1 year ago

I would close this, even with that info I can't really replicate it. But maybe that's also a bug that got fixed from Safari 16 to 16.1.

If anyone has info if any improvements to fields are needed to prevent such buggy behaviour, please let us know.

silllli commented 1 year ago

Thank you all for looking into it!