Pointer Events support?

Here is hopefully, a final test:

https://zimjs.com/drag3.html

We have removed the maxTouchPoints > 0 part as it seems the board is reporting the wrong number. Ferudun concurs. I have contacted their support about it to see what they say. At the AI and Ferudun recommendation, we have also moved the pointer events to above the touch events. We have tested everything that we can think of in ZIM with pointer events and they seem fine. (general mouse events, drag, drag with cursor outside browser, gesture, tap with double click, hov, motionController, TextureActive)

So, could you ask the teacher to let us know if the circle drags and take a screenshot of the page. Thanks.

We have lift off! Dragging is now working on the Promethean board. Thank you so much for your persistence! It would been interesting to see the value of maxTouchPoints that the board was reporting.

image

I've also successfully tested it on:

  • Google Pixel 9a phone (Chrome)
  • OnePlus Pad 2 tablet (Chrome)
  • iPad + iPhone (Safari + Duck Duck Go)
  • Windows 11 touchscreen laptop (Edge, Chrome v139 and v143 + Firefox)
  • Chromebook with touchscreen (Chrome)
  • Windows 11 + Ubuntu desktops without touchscreens

Hopefully the other schools get back with more positive results!

2 Likes

We will do more testing this afternoon and then patch the createjs and let you know.

Woah this is amazing! Thank you so much everybody for this amazing work. I'm sorry, I've only just seen this. I didn't get any feedback from any of the people I sent the first page to. I'm going to the BETT educational technology show in London next week. I was hoping to try the file and some games on ViewSonic and others there. It has been impossible to speak to Promethean.

1 Like

I'm on https://sett-vlaanderen.be 25 feb 2026 an https://ipon.nl with ZIM Netherlands
taking about you @Jamesbrrtt and ictgames see

https://www.sett-vlaanderen.be/nl/session/zimjs-kids-2d3d-online-webapps-voor-bewegend-leren-maken-met-webcam-ml5vr-integratie/

1 Like

Wow, that's awesome Karel. Flying the flag for ZIMjs in schools too. Thank you for including ictgames in your presentation! Hope it goes brilliantly!

1 Like

come along to belgium 25 feb.. over the northsea welcome at my house..

1 Like

@Core did you manage to test the new Pointer Events implementation in CreateJS with as many browsers and devices as possible? It's a modernization that will hopefully pay off so please help out.

Please ensure the circle is draggable; if not submit a screenshot and i it works let us know:

https://zimjs.com/drag3.html

I went to try a couple touch screens at Sheridan and they could not get them going so they are trying to fix them. I had a dozen students try their mobiles and they all worked. My touch screen works (HP monitor - Pavilion 23tm) @Ferudun tested on his interactive whiteboard and it worked.

We came in to patch createjs 1.5 which is used by ZIM 019 and just launched fairly recently... call it within the patch time.

The question is... do we retro patch older versions. I guess, patching 1.5 and seeing how it goes for a while, then deciding.

It works on my Wacom Cintiq and iPad. Will try some boards this week.

1 Like

Let me know when the 1.5 patch / ZIM 019 combo is live and I update some of my resources to use it, and give it a test.

1 Like

CreateJS 1.5 has been updated to include the new touch code with the following two changes:

  1. In the Touch.isSupported test there is a test for:
window.PointerEvent && window.navigator.maxTouchPoints > 0

We have removed the second part (maxTouchPoints) which was reporting false on some boards. So now, those boards are considered Touch enabled. We reported the issue to the board creators via their support email.

  1. We switched to pointer event priority as the boards were also not recognizing
'ontouchstart' in window

Possibly we could have replaced this test with:

typeof window.TouchEvent !== 'undefined'

But in the end, the consensus was to solve it by testing for pointer events first rather than touch events. Pointer events were new when CreateJS was made so I think they may have hesitated to do this.

CONCLUSION

We will see how it goes for the next while and then consider updating older versions of CreateJS. And providing the change to the CreateJS GitHub.

Thanks @Chris_S and @Ferudun for the work on this. And others for the testing. Please keep testing

https://zimjs.com/drag3.html

on touch screens and let us know if you do and the result.

Thanks!

image

3 Likes

I'm going to BETT in London this week. I'll ask all the board manufacturers there if I can test the page. It's the biggest event in the UK so there should be a good range. Also I've written to my the school where I used to teach to ask if I can go in and test the page there as there's 18 boards to try.

Much of what you're talking about goes above my head here... Can I just check what we need:

  1. Drag the circle
  2. A screen shot
  3. Browser and version number
  4. Board name and brand
3 Likes

Testing across a wide range of boards sounds great James, I like your thinking!

1 Like

Thank you. I can't help with the programming. I have my doubts that they'll all let me try it at BETT, but a few might.
Am I right that this is a complete change and so we need to know if all boards are happy with this version?

1 Like

It is not that much of a change on boards. All we did there was drop the maxNumTouches > 0 requirement which was for some reason not returning true on some boards - this is the what started the thread. But we are wanting to test on as many touch screens as possible to make sure that we work on all of them now.

It is a some-what big change for non-touch screens as we are now using pointer events rather than traditional mouse events.

2 Likes

@Chris_S has prepared a modernized version of CreateJS see CreateJS Modernization? that takes out older code and this greatly simplifies the touch events tests. So... maybe we should also test

https://zimjs.com/drag4.html

as well if we want to test this future createjs file.

image

2 Likes

Not sure if it is worth the bother, but got a response from Promethean.

Would a more reliable way to detect touch support be as follows?

Touch.isSupported = function() {
    return !!(('ontouchstart' in window) // iOS & Android
        || (window.MSPointerEvent && window.navigator.msMaxTouchPoints > 0) // IE10
        || (window.PointerEvent)
        || (window.navigator.maxTouchPoints > 0)); // Extra fallback
};

Check out the pull request here CreateJS Modernization by spoltop · Pull Request #1 · danzen/createjs · GitHub

It's down to:

Touch.isSupported = function() {
	return !!window.PointerEvent;
};

The more I think about this, I question whether the Touch.isSupported code is still required at all. Pointer Events don’t care whether touch is supported so why should it matter?

It depends on how this Touch handling is used, which I want to explore further but not when I should be asleep.