The Needs Review Queue Bot → tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- Status changed to Needs review
almost 2 years ago 3:08pm 1 February 2023 - 🇺🇸United States attheshow
I just wanted to make a note here that we're running into the same issue in an off-canvas dialog where the fields don't get properly re-focused after an AJAX callback occurs. It appears to be tied to the focus code inside of dialog.ajax.js rather than the regular ajax.js file referenced in the previous patches. It might be something to consider when doing further testing and development on this.
- Status changed to Needs work
almost 2 years ago 10:55am 10 February 2023 The Needs Review Queue Bot → tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- Status changed to Needs review
almost 2 years ago 4:59am 28 February 2023 - Status changed to Needs work
almost 2 years ago 2:35pm 28 February 2023 - 🇺🇸United States smustgrave
Make it work!
Would be better to mention how it was made to work.
- 🇺🇸United States attheshow
I took a look at the latest patch but didn't see any changes in dialog.ajax.js. I think we'll need some similar changes to happen there if it's going to work inside of the off-canvas dialogs.
- Status changed to Needs review
over 1 year ago 12:55pm 12 May 2023 - last update
over 1 year ago 29,390 pass - 🇺🇸United States bnjmnm Ann Arbor, MI
Issue summary updated.
Re #31:
I took a look at the latest patch but didn't see any changes in dialog.ajax.js. I think we'll need some similar changes to happen there if it's going to work inside of the off-canvas dialogs.
I expanded the test coverage to prove this solution works with off canvas as well.
- Status changed to RTBC
over 1 year ago 8:57pm 12 May 2023 - 🇺🇸United States smustgrave
Thanks @bjmnm for updating the issue summary. Changes look good.
- last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago 29,398 pass - last update
over 1 year ago 29,401 pass 16:08 13:09 Running- last update
over 1 year ago 29,402 pass - Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass The last submitted patch, 32: 3020061-32.patch, failed testing. View results →
- last update
over 1 year ago 29,411 pass - last update
over 1 year ago 29,411 pass - Status changed to Needs review
over 1 year ago 9:08pm 5 June 2023 - 🇫🇮Finland lauriii Finland
The patch is introducing jQuery UI dialog dependent code to the Ajax system. I think we should look if we could move that to the code that integrates the jQuery UI dialog with the Ajax system in
core/misc/dialog/dialog.ajax.js
. - Status changed to Needs work
over 1 year ago 1:44pm 6 June 2023 - 🇦🇺Australia darvanen Sydney, Australia
Also it's directly editing ajax.js when it should be editing ajax.es6.js and compiling ajax.js.
- 🇫🇮Finland lauriii Finland
@darvanen We stopped using .es6.js files because all browsers Drupal core supports have support for ES6. See https://www.drupal.org/node/3305487 → for more info. 😊
- 🇦🇺Australia darvanen Sydney, Australia
Oh brilliant! Thanks for the heads-up @laurii
- Merge request !5377Resolve #3020061 "ax replace does not refocus element if inside a dialog" → (Closed) created by bnjmnm
- Status changed to Needs review
about 1 year ago 4:47pm 13 November 2023 - 🇺🇸United States bnjmnm Ann Arbor, MI
Re #37
The patch is introducing jQuery UI dialog dependent code to the Ajax system. I think we should look if we could move that to the code that integrates the jQuery UI dialog with the Ajax system in core/misc/dialog/dialog.ajax.js.
Took a look at dialog.ajax.js and noticed that what was believed to be a jQuery UI focus management problem was actually something core introduced many years ago with #2113567: Views dialogs don't close via escape. → . Adding a condition to only refocus the dialog if focus has been lost seems to fix the issue reported here. Pushed an MR. Lets see if DrupalCI agrees.
- 🇫🇮Finland lauriii Finland
There's also other related issue where the focus is set using different conditions when AJAX updates the dialog compared to when opening a new dialog: 🐛 Dialog focus is returned to dialog instead of first tabbable element on dialog AJAX update Fixed .
- Status changed to RTBC
about 1 year ago 11:34pm 14 November 2023 - 🇺🇸United States smustgrave
Hiding the patches as the fix is in the MR now
Rebased and ran the test-only feature and got
There were 2 failures: 1) Drupal\FunctionalJavascriptTests\Ajax\FormValuesTest::testSimpleAjaxFormValue with data set #1 ('dialog') The link Open form in dialog was not found on the page. Failed asserting that an array has the key 0. /builds/issue/drupal-3020061/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121 /builds/issue/drupal-3020061/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55 /builds/issue/drupal-3020061/core/tests/Drupal/Tests/UiHelperTrait.php:414 /builds/issue/drupal-3020061/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php:50 /builds/issue/drupal-3020061/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 2) Drupal\FunctionalJavascriptTests\Ajax\FormValuesTest::testSimpleAjaxFormValue with data set #2 ('off canvas dialog') The link Open form in off canvas dialog was not found on the page. Failed asserting that an array has the key 0. /builds/issue/drupal-3020061/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121 /builds/issue/drupal-3020061/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55 /builds/issue/drupal-3020061/core/tests/Drupal/Tests/UiHelperTrait.php:414 /builds/issue/drupal-3020061/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php:50 /builds/issue/drupal-3020061/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 FAILURES! Tests: 4, Assertions: 41, Failures: 2.
Think this is good to RTBC again.
- Status changed to Needs work
about 1 year ago 10:29am 20 November 2023 - Status changed to Needs review
about 1 year ago 8:32am 23 November 2023 - Status changed to Needs work
about 1 year ago 9:27am 23 November 2023 - 🇮🇳India yash.rode pune
I have tested this, it is working as expected and test coverage looks good to me.
There is one small documentation nit, after which this is good to go. - Status changed to RTBC
about 1 year ago 1:22pm 23 November 2023 - Status changed to Fixed
about 1 year ago 1:57pm 23 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.