Q:

primefaces lightbox triggers Uncaught Type error

I have a lightbox on my main page that is displayed automatically when the user logs in for the first time, but when the page is loaded a weird javascript error appears in the console which makes that everything related to Primefaces stop working. This is the code of my lightbox:
<p:lightBox styleClass="imagebox" id="lightbox1" visible="true" 
            rendered="#{dashboardBean.firstTimeLoggedIn}" widgetVar="lightbox1"
            onHide="hideInstructions()">
            <h:outputLink 
                value="#{request.contextPath}/resources/images/instructions/instructions-1.gif"
                title="Step 1"/>           

            <h:outputLink
                value="#{request.contextPath}/resources/images/instructions/instructions-2.gif"
                title="Step 2" />            
            <h:outputLink
                value="#{request.contextPath}/resources/images/instructions/instructions-3.gif"
                title="Step 3" />            
</p:lightBox>
        <h:form  rendered="#{dashboardBean.firstTimeLoggedIn}">
            <p:remoteCommand name="hideInstructions"
                action="#{sessionBean.hideInstructions}" />
        </h:form>

And this is the first error that appears in the console of chrome:

After that if i click in any primefaces button, link, etc.. It just doesn't work

A:

It turned out that it was a bug of the p:lightbox. The error was coming from this file in the line 274, because e.originalEvent was undefined:
 if(e.originalEvent.touches) {
                pageX = e.originalEvent.touches[0].pageX;
                pageY = e.originalEvent.touches[0].pageY;
   } else {
                pageX = e.pageX;
                pageY = e.pageY;
  }

The bug was fixed in this commit
The fix was to add a validation to the first line:
if(e.originalEvent && e.originalEvent.touches) 

