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

Bugfix for document.ontouchstart detection #3419

Merged
merged 2 commits into from Sep 3, 2014
Merged

Bugfix for document.ontouchstart detection #3419

merged 2 commits into from Sep 3, 2014

Conversation

lovmat
Copy link
Contributor

@lovmat lovmat commented Aug 27, 2014

No description provided.

@@ -34,7 +34,7 @@ $(document).ready(function () {
this.screenBlock = this.container.find('.cms_screenblock');

// states
this.click = (document.ontouchstart !== null) ? 'click.cms' : 'touchend.cms';
this.click = (document.ontouchstart == null) ? 'click.cms' : 'touchend.cms';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use === thanks

@yakky yakky added the frontend label Aug 27, 2014
@lovmat
Copy link
Contributor Author

lovmat commented Aug 27, 2014

Updated the pull request after doing some testing on our computers.

Computer 1 ("win8 normal laptop"):
Firefox 31.0: document.ontouchstart is: null
Chrome 36.0.1985.143 m: document.ontouchstart is: undefined
This results in toolbar not working in Firefox.

Computer 2 ("win8 laptop with touchscreen"):
Firefox 31.0: document.ontouchstart is: undefined
Chrome 36.0.1985.143 m: document.ontouchstart is: null
This results in toolbar not working in Chrome.

Since the document.ontouchstart seems to be a bit unreliable it might be best to listen to both. At least it works good for us.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 5d14e50 on lovmat:develop into 5061b2b on divio:develop.

@coveralls
Copy link

coveralls commented Aug 27, 2014

Coverage Status

Coverage decreased (-0.1%) to 87.634% when pulling 5d14e50 on lovmat:develop into 5061b2b on divio:develop.

@digi604
Copy link
Contributor

digi604 commented Sep 1, 2014

@FinalAngel could you review this quickly?

@FinalAngel
Copy link
Member

@digi604 we can implement this, it is yet not a proper solution for the entire mobile editing topic

FinalAngel pushed a commit that referenced this pull request Sep 3, 2014
Bugfix for document.ontouchstart detection
@FinalAngel FinalAngel merged commit 9552354 into django-cms:develop Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants