{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/22890","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22890/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22890/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22890/events","html_url":"https://github.com/joomla/joomla-cms/pull/22890","id":376034473,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MzQyNzYw","number":22890,"title":"Adds keyup trigger on showon elements","user":{"login":"regularlabs","id":13553242,"node_id":"MDQ6VXNlcjEzNTUzMjQy","avatar_url":"https://avatars1.githubusercontent.com/u/13553242?v=4","gravatar_id":"","url":"https://api.github.com/users/regularlabs","html_url":"https://github.com/regularlabs","followers_url":"https://api.github.com/users/regularlabs/followers","following_url":"https://api.github.com/users/regularlabs/following{/other_user}","gists_url":"https://api.github.com/users/regularlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/regularlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regularlabs/subscriptions","organizations_url":"https://api.github.com/users/regularlabs/orgs","repos_url":"https://api.github.com/users/regularlabs/repos","events_url":"https://api.github.com/users/regularlabs/events{/privacy}","received_events_url":"https://api.github.com/users/regularlabs/received_events","type":"User","site_admin":false},"labels":[{"id":60721348,"node_id":"MDU6TGFiZWw2MDcyMTM0OA==","url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-10-31T15:54:04Z","updated_at":"2018-11-02T10:52:08Z","closed_at":"2018-10-31T16:49:36Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/22890","html_url":"https://github.com/joomla/joomla-cms/pull/22890","diff_url":"https://github.com/joomla/joomla-cms/pull/22890.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/22890.patch"},"body":"### Summary of Changes\r\nThis PR will make elements show/hide when typing in a text field.\r\n\r\nCurrently, the showon elements are only updated when the value of a field changes (onChange).\r\nHowever, when typing in a text field, the change event is only triggered when the focus is moved to another element.\r\n\r\nSo the PR changes that behaviour to also update the showon fields when the keyup event is triggered.\r\n\r\n\r\n### Testing Instructions\r\nAdd this code to a form xml file (inside a fieldset).\r\nWe'll use the banners config file for this example:\r\n`administrator/components/com_banners/config.xml`\r\n```\r\n<field name=\"my_text_field\" type=\"text\" label=\"My Text Field\" />\r\n<field name=\"my_note\" type=\"note\" class=\"alert alert-success\"\r\n\t   description=\"Shows when the text field is not empty\"\r\n\t   showon=\"my_text_field!:\"\r\n/>\r\n```\r\n\r\n### Before PR\r\nStart typing in the text field. Nothing happens.\r\nBut when clicking outside the textfield, or hitting tab, the note shows.\r\n![before](https://user-images.githubusercontent.com/13553242/47800963-81751180-dd2d-11e8-9628-7b5dade509c6.gif)\r\n\r\n### After PR\r\nStart typing in the empty text field. \r\nThe note shows as soon as it is not empty.\r\nThe note also hides again as soon as you delete the characters in the text field.\r\n![after](https://user-images.githubusercontent.com/13553242/47800973-833ed500-dd2d-11e8-83dc-b99bc0426a8f.gif)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/435341498","html_url":"https://github.com/joomla/joomla-cms/pull/22890#issuecomment-435341498","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22890","id":435341498,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTM0MTQ5OA==","user":{"login":"ggppdk","id":5092940,"node_id":"MDQ6VXNlcjUwOTI5NDA=","avatar_url":"https://avatars2.githubusercontent.com/u/5092940?v=4","gravatar_id":"","url":"https://api.github.com/users/ggppdk","html_url":"https://github.com/ggppdk","followers_url":"https://api.github.com/users/ggppdk/followers","following_url":"https://api.github.com/users/ggppdk/following{/other_user}","gists_url":"https://api.github.com/users/ggppdk/gists{/gist_id}","starred_url":"https://api.github.com/users/ggppdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggppdk/subscriptions","organizations_url":"https://api.github.com/users/ggppdk/orgs","repos_url":"https://api.github.com/users/ggppdk/repos","events_url":"https://api.github.com/users/ggppdk/events{/privacy}","received_events_url":"https://api.github.com/users/ggppdk/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T10:52:08Z","updated_at":"2018-11-02T10:52:08Z","author_association":"CONTRIBUTOR","body":"\r\n> Auto-updating: For any auto-updating information that (1) starts automatically and (2) is presented in parallel with other content, there is a mechanism for the user to pause, stop, or hide it or to control the frequency of the update unless the auto-updating is part of an activity where it is essential.\r\n\r\nThere is a clarification on what in that document on what is considered \"auto-updating\" and \"distraction\". This PR does not seem to fall into the case of auto-updating on a preset time, nor it is unrelated to the user actions, it is the result of the user actions\r\n\r\n----\r\n\r\n> The intent of this Success Criterion is to avoid distracting users during their interaction with a Web page.\r\n\r\n> \"Moving, blinking and scrolling\" refers to content in which the visible content conveys a sense of motion. Common examples include motion pictures, synchronized media presentations, animations, real-time games, and scrolling stock tickers. \r\n\r\n> **\"Auto-updating\" refers to content that updates or disappears based on a preset time interval.**\r\n\r\n> Common time-based content includes audio, automatically updated weather information, news, stock price updates, and auto-advancing presentations and messages. The requirements for moving, blinking and scrolling content and for auto-updating content are the same except that: "}}
{"actor":{"display_login":"ggppdk"}}