{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/1313","repository_url":"https://api.github.com/repos/primefaces/primefaces","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/1313/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/1313/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/1313/events","html_url":"https://github.com/primefaces/primefaces/issues/1313","id":147992170,"number":1313,"title":"Primefaces 5.3: ajax event is undefined","user":{"login":"andriyboychenko","id":6023769,"avatar_url":"https://avatars.githubusercontent.com/u/6023769?v=3","gravatar_id":"","url":"https://api.github.com/users/andriyboychenko","html_url":"https://github.com/andriyboychenko","followers_url":"https://api.github.com/users/andriyboychenko/followers","following_url":"https://api.github.com/users/andriyboychenko/following{/other_user}","gists_url":"https://api.github.com/users/andriyboychenko/gists{/gist_id}","starred_url":"https://api.github.com/users/andriyboychenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andriyboychenko/subscriptions","organizations_url":"https://api.github.com/users/andriyboychenko/orgs","repos_url":"https://api.github.com/users/andriyboychenko/repos","events_url":"https://api.github.com/users/andriyboychenko/events{/privacy}","received_events_url":"https://api.github.com/users/andriyboychenko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/primefaces/primefaces/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-13T08:57:54Z","updated_at":"2016-04-13T09:39:34Z","closed_at":"2016-04-13T09:39:34Z","body":"I'm trying to implement a function in javascript, that will restore tab scroll position after closing it. I defined an ajax, which will be called on tabClose event:\r\n\r\n```\r\n\t<p:ajax event=\"tabClose\" listener=\"#{addViewMenuBean.onTabClose}\" update=\":tabView\" \r\n           onstart=\"saveScrollPosition(event);\" oncomplete=\"restoreScrollPostion();\"/>\r\n```\r\n\r\nand the javascript to save scroll position is defined as following:\r\n\r\n```\r\n    function saveScrollPosition(event){\r\n    \tvar closedTabWidth = $(event.target).parent().outerWidth();\r\n    \t...\r\n    }\r\n```\r\n\r\nMy problem is in the first line of javascript. The event is null. Do you know the reason why I can't obtain the closing event target?"},"comment":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/comments/209339236","html_url":"https://github.com/primefaces/primefaces/issues/1313#issuecomment-209339236","issue_url":"https://api.github.com/repos/primefaces/primefaces/issues/1313","id":209339236,"user":{"login":"tandraschko","id":2485545,"avatar_url":"https://avatars.githubusercontent.com/u/2485545?v=3","gravatar_id":"","url":"https://api.github.com/users/tandraschko","html_url":"https://github.com/tandraschko","followers_url":"https://api.github.com/users/tandraschko/followers","following_url":"https://api.github.com/users/tandraschko/following{/other_user}","gists_url":"https://api.github.com/users/tandraschko/gists{/gist_id}","starred_url":"https://api.github.com/users/tandraschko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tandraschko/subscriptions","organizations_url":"https://api.github.com/users/tandraschko/orgs","repos_url":"https://api.github.com/users/tandraschko/repos","events_url":"https://api.github.com/users/tandraschko/events{/privacy}","received_events_url":"https://api.github.com/users/tandraschko/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T09:39:34Z","updated_at":"2016-04-13T09:39:34Z","body":"Thats not a issue, use the forum next time.\r\nonStart just provides a js param called \"cfg\". \"event\" is not available.\r\nit should be possible to obtain the target via the cfg obj - do a console.log(cfg) and you should see everything ;)"}}