Skip to main content

Search and Top Navigation

#9646 closed feature (fixed)

Opened November 04, 2013 02:05PM UTC

Closed February 21, 2014 06:57PM UTC

Last modified June 10, 2014 11:58AM UTC

Core: Deprecate .focus( delay)

Reported by: jzaefferer Owned by:
Priority: blocker Milestone: 1.11.0
Component: ui.core Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

As discussed in Amsterdam, we only use the delayed focus call in dialog. We don't need to modify core methods for just two calls. We should just use

to delay the focus call.

Attachments (0)
Change History (10)

Changed November 04, 2013 02:05PM UTC by jzaefferer comment:1

status: newopen

Changed November 05, 2013 08:39AM UTC by scottgonzalez comment:2

milestone: none1.11.0
summary: Dialog: Inline delay(x) from core to dialogCore: Deprecate .focus( delay)
type: bugfeature

Changed November 05, 2013 08:39AM UTC by scottgonzalez comment:3

component: ui.dialogui.core

Changed November 05, 2013 08:40AM UTC by scottgonzalez comment:4

priority: minorblocker

Changed February 11, 2014 07:00PM UTC by jzaefferer comment:5

We have a ton of usage within our unit tests. Updating all those will be a PITA. Can we move the proxied focus method to tests/unit/testsuite.js and leave unit tests as-is? That way we still only have to update dialog.

Changed February 16, 2014 04:25AM UTC by jzaefferer comment:6

My earlier comment was very wrong, I tested the wrong thing. There's two calls in dialog, that's all there is. I've got a patch locally that makes .focus(n) throw an error ("Delayed focus is deprecated, use timeouts and call focus yourself"), along with removing the tests for the proxied method and replacing the usage in dialog. That's probably not good enough for deprecation, and while I remember seeing something about not using $.ui.backCompat anymore, I currently don't know what the right approach for this particular case is.

For rerefence, gist-diff of the patch:

Changed February 16, 2014 02:56PM UTC by scottgonzalez comment:7

Throwing an error is never valid for deprecation, the functionality needs to still work otherwise it's not deprecated. We're still using $.uiBackCompat for now.

Changed February 21, 2014 12:24PM UTC by jzaefferer comment:8

Changed February 21, 2014 06:57PM UTC by Jörn Zaefferer comment:9

resolution: → fixed
status: openclosed

Core: Deprecate .focus( n ), replace in dialog with explicit timeouts

Fixes #9646

Changeset: df6110c0d424ff3306fdd5576011f2dcf4d242d0

Changed June 10, 2014 11:58AM UTC by Jörn Zaefferer comment:10

Dialog: Fix shift-tab handling, focus the correct element

Copy-paste error introduced in df6110c0d424ff3306fdd5576011f2dcf4d242d0

Updates the tabbing test to be more specific about which element should

have focus, instead of only checking if focus is within the dialog.

Ref #9646

Ref #10103

Closes gh-1264

Changeset: a0b84767a76098cdcc6375dfe28a7fee866bd395