Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p:lightbox triggers Uncaught Type error Touches #1357

Closed
rrdlpl opened this issue Apr 27, 2016 · 4 comments
Closed

p:lightbox triggers Uncaught Type error Touches #1357

rrdlpl opened this issue Apr 27, 2016 · 4 comments
Assignees
Labels
🐞 defect Bug...Something isn't working
Milestone

Comments

@rrdlpl
Copy link

rrdlpl commented Apr 27, 2016

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>

This is the error that appears in the console of chrome:

Note: I'm not including any jQuery library.
PrimeFaces version: 5.3

@rrdlpl
Copy link
Author

rrdlpl commented Apr 27, 2016

II think that the error is coming from this file Line 274.

 if(e.originalEvent.touches) {
                pageX = e.originalEvent.touches[0].pageX;
                pageY = e.originalEvent.touches[0].pageY;
   } else {
                pageX = e.pageX;
                pageY = e.pageY;
  }

is it possible that e.originalEvent is undefined at the beginning when the page is loading?

tandraschko added a commit that referenced this issue Apr 27, 2016
@tandraschko tandraschko added the 🐞 defect Bug...Something isn't working label Apr 27, 2016
@tandraschko tandraschko added this to the 6.0 milestone Apr 27, 2016
@tandraschko tandraschko self-assigned this Apr 27, 2016
@tandraschko
Copy link
Member

Please try with trunk.

@rrdlpl
Copy link
Author

rrdlpl commented Apr 27, 2016

@tandraschko I dont understand your comment. What do you mean with trunk?

@tandraschko
Copy link
Member

That i fixed it in trunk/master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 defect Bug...Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants