Skip to content

Conversation

@Arnei
Copy link
Member

@Arnei Arnei commented Jul 30, 2025

In Safari, open the details of an event and click on one of the multi-select fields (e.g. presenters, contributors). This will open up a dropdown which hides already selected values. This is not desirable. Like in other browsers, the dropdown should only open after clicking the field an additional time.

This patch fixes the issue by removing autoFocus attribute from the input element. This has an annoying side effect in that while you now need two clicks in Safari, you need three clicks in other browsers (e.g. Firefox). Arguably a better solution would be to get rid of <datalist> entirely, as it is not well supported. But this quick fix should be acceptable for now.

How to test this

Can be tested as usual. Test with different browsers, Safari and otherwise.

In Safari, open the details of an event and click on one of the
multi-select fields (e.g. presenters, contributors).
This will open up a dropdown which hides already selected values.
This is not desirable. Like in other browsers, the dropdown should only
open after clicking the field an additional time.

This patch fixes the issue by removing autoFocus attribute from the
input element. This has an annoying side effect in that while you now
need two clicks in Safari, you need three clicks in other browsers
(e.g. Firefox). Arguably a better solution would be to get rid of
`<datalist>` entirely, as it is not well supported. But this quick fix
should be acceptable for now.
@Arnei Arnei added the type:bug Something isn't working label Jul 30, 2025
@github-actions
Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1385

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1385

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

@gregorydlogan
Copy link
Member

I don't have Safari, but I do have Chrome and Firefox, neither of which seem to be behaving quite right.

Chrome:
Two clicks, but it's unclear if those suggestions are coming from Opencast, or my browser's suggestion list. The ones at the bottom present in the particular test instance I'm using, but there's a space between them at the top ones which makes me wonder if Chrome is being helpful and adding its suggestions after the ones fetched from the system?

Screencast.from.2025-09-03.15-07-23.mp4

Firefox:
Similar to Chrome, except it takes three clicks to get the suggestions. Same test instance, notably missing suggestions like orga, and lkjh.

Screencast.from.2025-09-03.15-08-59.mp4

In neither case does the UI look quite right to me - I would expect a React style dropdown the way that the License field works. I guess I don't care if it looks this way, but it's out of place when compared to the rest of the UI.

@Arnei
Copy link
Member Author

Arnei commented Sep 4, 2025

Ah heck, thanks for testing. Then this PR just might not be the right approach and we'll have to get rid of <datalist> alltogether. That'll be more work though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants