New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(attach-focus): restore behavior prior to #346 #349

Merged
merged 2 commits into from Jun 3, 2018

Conversation

Projects
None yet
2 participants
@StrahilKazlachev
Contributor

StrahilKazlachev commented Jun 1, 2018

make it work as boolean attribute
set the default binding mode to oneTime
update tests

fix(attach-focus): restore behavior prior to #346
make it work as boolean attribute
set the default binding mode to oneTime
update tests
@StrahilKazlachev

This comment has been minimized.

Contributor

StrahilKazlachev commented Jun 1, 2018

@bigopon can you check? As we discussed, I hope so 😅

component.create(bootstrap).then(() => {
expect(document.activeElement).not.toBe(viewModel.focusTargetElement);
viewModel.hasFocus = true;
(Container.instance.get(TaskQueue) as TaskQueue).queueMicroTask(() => {

This comment has been minimized.

@StrahilKazlachev

StrahilKazlachev Jun 1, 2018

Contributor

@bigopon can you advice if there is a better way to await the change?

This comment has been minimized.

@bigopon

bigopon Jun 1, 2018

Member

task queue has flushMicroTaskQueue() that can be used for this situation, to immediately apply the changes

This comment has been minimized.

@StrahilKazlachev

StrahilKazlachev Jun 1, 2018

Contributor

@bigopon I'll still need the TaskQueue. Anything in testing I can use?

@StrahilKazlachev StrahilKazlachev merged commit 915e735 into aurelia:master Jun 3, 2018

2 checks passed

WIP ready for review
Details
license/cla Contributor License Agreement is signed.
Details

@StrahilKazlachev StrahilKazlachev deleted the StrahilKazlachev:fix/attach-focus/change-handler branch Aug 11, 2018

StrahilKazlachev added a commit to StrahilKazlachev/dialog that referenced this pull request Aug 12, 2018

StrahilKazlachev added a commit that referenced this pull request Aug 12, 2018

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