Skip to content

Add blurFocus option to disable bluring the focus of existing elements.#545

Merged
mislav merged 1 commit intodefunkt:masterfrom
thedeadtellnotales:master
Jul 21, 2015
Merged

Add blurFocus option to disable bluring the focus of existing elements.#545
mislav merged 1 commit intodefunkt:masterfrom
thedeadtellnotales:master

Conversation

@emidoots
Copy link

This change adds a blurFocus option that disables the focus blurring that occurs on existing elements when loading content. This can be useful if using PJAX to reload the contents of a search page, for instance.

Multiple other people requested this feature back in 2013 when the blurring was introduced, and additionally so on a fork of your project.

@mislav
Copy link
Collaborator

mislav commented Jul 21, 2015

See #378 (comment)

I wouldn't add a configuration option. I would rather add a condition that elements should only get blurred/refocused if inside the pjax container.

@emidoots
Copy link
Author

I've addressed your feedback in 70e30e5.

Thank you for your feedback and time spent on this @mislav, really appreciate it!

jquery.pjax.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt we also defer this DOM operation to only evaluate when blurFocus is true?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Done.

@mislav
Copy link
Collaborator

mislav commented Jul 21, 2015

Thanks! Please squash all commits to one and force-push to this branch

This can be useful if using PJAX to reload the contents of a search page, for instance.

See defunkt#377
@emidoots
Copy link
Author

@mislav Done. PTAL.

mislav added a commit that referenced this pull request Jul 21, 2015
Add blurFocus option to disable bluring the focus of existing elements.
@mislav mislav merged commit 73ffcc5 into defunkt:master Jul 21, 2015
@mislav
Copy link
Collaborator

mislav commented Jul 21, 2015

Thanks!

@emidoots
Copy link
Author

I really appreciate your timely responses @mislav; thanks for the hard work! 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants