Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/203#discussion_r21818331
  
    --- Diff: app/addons/fauxton/components.js ---
    @@ -553,6 +553,12 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
           _.bindAll(this);
         },
     
    +    afterRender: function () {
    +      this.$('.modal').on('shown', function () {
    +        $('input:text:visible:first', this).focus();
    --- End diff --
    
    We usually use `this.$` and no `$(selector)` - I assume you use a global 
selector as you were the context of this was wrong?
    
    ```javascript
          this.$('.modal').on('shown', function () {
            this.$('input').focus();
          }.bind(this));
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to