Cannot focus text inputs in PersonLinkField

Hi there,

we have been using Indico for a while but recently noticed an issue that I have not been able to find any discussion on. Specifically, it is impossible to enter anything into the text inputs in the Principal Search modal and PersonDetailsModal because they cannot be focused.

By adding events listeners to the document we were able to discover that the issue is once these inputs are focused (by clicking on or tabbing to them), a function is triggered which redirects the focus to the button which was used to open the modal (Add from search / Enter manually). Interestingly this only happens in abstract and contribution forms, not however for the Speaker / Chairperson field in the event settings form.

As best we can tell the issue lies with jQuery UI which seemingly implements a focus trap directing focus back to the previously focused element (the button used to open the modal dialog) if something outside the abstract form dialog is focused (such as an input inside the modal dialog).

I was wondering, has anybody else experienced this particular issue? If so I think it would be appropriate to open an issue but I’m unsure if the issue is caused by our specific setup which may make it irrelevant to other users.

We are running Indico as a development instance, installed according to the documentation on a Debian 13 system. The application is exposed through a uwsgi socket as described in the documentation for a production setup. I can give more details if required but we also have a productive instance running a custom Indico build, built according to the instructions and both instances suffer from this issue. The changes are fairly minimal and do not touch the JS elements at all.

Thank you all for your work and kind regards
Michi

I cannot reproduce this (I tried using the user impersonation dialog and the ‘add speakers’ widget of the lecture creation dialog), and if others had the same issue I think we’d see angry users with pitchforks in front of our offices…

So I think it must be somehow related to your changes. It’s hard to make guesses though w/o knowing the changes (if you can push them to a GitHub repo I’d be happy to have a quick look if I spot something obvious).

1 Like

Thanks! You can check the changes here :slight_smile:

-        "jquery-ui": "~1.12.1",
+        "jquery-ui": "^1.13.2",

Revert this (npm i 'jquery-ui@~1.12.1'). It’s actually documented in DEVELOPMENT.md as problematic:

jquery-ui stays on ^1.12.1 until we can get rid of it one day. Newer versions break focusing input elements inside react dialogs opened from a jquery ui modal.

Ah. My bad. I appreciate the quick help :kissing_face_with_smiling_eyes: