{"comment":{"url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/comments/23939454","html_url":"https://github.com/Microsoft/BotFramework-WebChat/commit/a0790d24181c9be083f4cef1645d8e2538cd05b0#commitcomment-23939454","id":23939454,"user":{"login":"vinod83k","id":23446979,"avatar_url":"https://avatars1.githubusercontent.com/u/23446979?v=4","gravatar_id":"","url":"https://api.github.com/users/vinod83k","html_url":"https://github.com/vinod83k","followers_url":"https://api.github.com/users/vinod83k/followers","following_url":"https://api.github.com/users/vinod83k/following{/other_user}","gists_url":"https://api.github.com/users/vinod83k/gists{/gist_id}","starred_url":"https://api.github.com/users/vinod83k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinod83k/subscriptions","organizations_url":"https://api.github.com/users/vinod83k/orgs","repos_url":"https://api.github.com/users/vinod83k/repos","events_url":"https://api.github.com/users/vinod83k/events{/privacy}","received_events_url":"https://api.github.com/users/vinod83k/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"a0790d24181c9be083f4cef1645d8e2538cd05b0","created_at":"2017-08-29T06:29:40Z","updated_at":"2017-08-29T06:29:40Z","body":"I already have this updated repo, but I was still getting the same problem of Form submit on click on any button in the Adaptive cards. So, I changed the following in AdaptiveCardContainer.jsx...\r\nAdaptiveCardContainer.prototype.onClick = function (e) {\r\n        if (!this.props.onClick)\r\n            return;\r\n        //do not allow form elements to trigger a parent click event\r\n        switch (e.target.tagName) {\r\n            case 'A':\r\n            case 'AUDIO':\r\n            case 'VIDEO':\r\n            case 'BUTTON':\r\n                **e.preventDefault();**\r\n                break;\r\n            case 'INPUT':\r\n            case 'LABEL':\r\n            case 'TEXTAREA':\r\n            case 'SELECT':\r\n            default:\r\n                this.props.onClick(e);\r\n        }\r\n    };\r\n\r\nand my button stopped submitting the form.\r\nBut, still I am facing issues with the other type of buttons in the Adaptive cards, i.e, Action.ShowCard or Action.OpenUrl, but I am not able to find a place where I shall apply code to preventDefault.\r\nRequest you to please help."}}
{"actor":{"display_login":"vinod83k"}}