{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/3192","repository_url":"https://api.github.com/repos/NativeScript/NativeScript","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/3192/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/3192/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/3192/events","html_url":"https://github.com/NativeScript/NativeScript/issues/3192","id":192037659,"number":3192,"title":"Question: PropertyChange textfield fire on auto-complete?","user":{"login":"bradmartin","id":6006148,"avatar_url":"https://avatars.githubusercontent.com/u/6006148?v=3","gravatar_id":"","url":"https://api.github.com/users/bradmartin","html_url":"https://github.com/bradmartin","followers_url":"https://api.github.com/users/bradmartin/followers","following_url":"https://api.github.com/users/bradmartin/following{/other_user}","gists_url":"https://api.github.com/users/bradmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/bradmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradmartin/subscriptions","organizations_url":"https://api.github.com/users/bradmartin/orgs","repos_url":"https://api.github.com/users/bradmartin/repos","events_url":"https://api.github.com/users/bradmartin/events{/privacy}","received_events_url":"https://api.github.com/users/bradmartin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"tsonevn","id":17448734,"avatar_url":"https://avatars.githubusercontent.com/u/17448734?v=3","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false},"assignees":[{"login":"tsonevn","id":17448734,"avatar_url":"https://avatars.githubusercontent.com/u/17448734?v=3","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-11-28T15:38:40Z","updated_at":"2016-11-29T07:01:44Z","closed_at":null,"body":"- NS 2.4 all\r\n- Only tested on Android as that's what the clients are mostly using when they report the issue.\r\n\r\nIn an app I use the `propertyChange` event on a text field to handle validation. \r\n\r\n```typescript\r\n\r\n  // Email validation\r\n        this.emailTextField.on(\"propertyChange\", ((args: PropertyChangeData) => {\r\n            if (this.emailTextField.text === '') {\r\n                this.emailErrorMsg = 'Email is required.';\r\n                this.emailContainer.classList.add('text-warning');\r\n            } else {\r\n                let isValid = emailValidator.validate(this.emailTextField.text);\r\n                if (isValid === false || !isValid) {\r\n                    this.emailErrorMsg = 'Email is invalid.';\r\n                    this.emailContainer.classList.add('text-warning');\r\n                } else {\r\n                    this.emailErrorMsg = '';\r\n                    this.emailContainer.classList.remove('text-warning');\r\n                }\r\n            }\r\n        }))\r\n```\r\n\r\nThe code works fine when the user keys in using the soft keyboard. What I didn't expect or test was users using auto-complete on their phones for their emails. So I've had numerous emails from users come in saying they can't sign in because it says invalid email because they've used the auto-complete email and not keyed in the value. I'm going to change the process in my app to not fire until a sign in attempt but the question is: is this a bug or expected behavior for `propertyChange` on the textfield?"},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/263492533","html_url":"https://github.com/NativeScript/NativeScript/issues/3192#issuecomment-263492533","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/3192","id":263492533,"user":{"login":"tsonevn","id":17448734,"avatar_url":"https://avatars.githubusercontent.com/u/17448734?v=3","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T07:01:44Z","updated_at":"2016-11-29T07:01:44Z","body":"Hi @bradmartin,\r\nThank you for reporting this issue.\r\nWe reviewed this scenario, however could you try to set `updateTextTrigger=\"focusLost\"` to the TextField, which will trigger property change when the value has been set. This should work for the case, when autocompletion has been used. Could you verify if this will work for you or if we could assist further.\r\n\r\nHope this helps."}}
{"actor":{"display_login":"tsonevn"}}