You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2015/10/02 19:12:20 UTC

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

GitHub user benkeen opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/546

    Fix for Safari not recognizing autofill on login form

    Safari doesn't trigger change events for form field autofills,
    so the state of the login component doesn't updated, triggering
    the rather irritating "you didn't fill in all the fields" error
    when visually you sure did.
    
    Since existing polyfill options don't work (see ticket), this fix
    explicitly checks for the condition of a mismatch of
    username-password form values and component state. It's a little
    inelegant, but justifiable I think.
    
    Closes COUCHDB-2829

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/benkeen/couchdb-fauxton safari-login-autofill-bug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/546.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #546
    
----
commit 71764658aa1c6a195542f8103a6c363f15fb13ed
Author: Ben Keen <be...@gmail.com>
Date:   2015-10-02T17:09:17Z

    Fix for Safari not recognizing autofill on login form
    
    Safari doesn't trigger change events for form field autofills,
    so the state of the login component doesn't updated, triggering
    the rather irritating "you didn't fill in all the fields" error
    when visually you sure did.
    
    Since existing polyfill options don't work (see ticket), this fix
    explicitly checks for the condition of a mismatch of
    username-password form values and component state. It's a little
    inelegant, but justifiable I think.
    
    Closes COUCHDB-2829

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/546#issuecomment-145589313
  
    Boy, this proved to be an absolute devil to test. I tried different methods of altering the DOM to set the form field values without triggering a change, but nothing worked. That actually makes a whole lot of sense since the whole *point* of React is that there's a 1-1 map between the fields + state in cases like this.
    
    The best I could come up with was adding a couple of component props intended to test this precise condition. The test uses them to confirm that non-state values are passed to the login action. I don't much like it, but it confirms the component works as expected for this given clause. Better ideas welcome!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/546#issuecomment-145464542
  
    @benkeen this is cool, but we need some tests for this. I know its only reproduceable on Safari but hopefully you can write some unit tests to just exercise that code base.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/546#issuecomment-145551262
  
    Yeah, fair enough! I'll see what I can rustle up. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen closed the pull request at:

    https://github.com/apache/couchdb-fauxton/pull/546


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/546#issuecomment-145915503
  
    Thanks, Garren! Merged as 191ef07


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix for Safari not recognizing autof...

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/546#issuecomment-145767071
  
    +1 nice work @benkeen 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---