Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Fix selecting input for newly-inserted post's first control #206

Merged
merged 6 commits into from
Aug 2, 2016

Conversation

westonruter
Copy link
Contributor

@westonruter westonruter commented Aug 1, 2016

This probably failed with the switch to embedding controls upon expanding a post section.

Fixes #209.

@westonruter westonruter added this to the 0.7 milestone Aug 1, 2016
@@ -341,6 +341,15 @@
section.postFieldControls.post_title = control;
api.control.add( control.id, control );

// Select the input's contents when the value is a placeholder.
control.deferred.embedded.done( function() {
control.container.find( ':input' ).on( 'focus', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@westonruter What is the use of selecting all input/textarea/select/button ( :input ) when post title field will only be input? I mean why not just use input ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True. It could just be input.

@westonruter westonruter merged commit 9194a52 into develop Aug 2, 2016
@westonruter westonruter deleted the bugfix/select-first-control-upon-insertion branch August 2, 2016 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants