scene.pick returning undefined unless double click

we're migrating from Cesium 1.9 to 1.17 and have an issue with triggering an event handler on click.

In the code below, one click return `scene.pick` as undefined, but the `movement.position` is a Cartesian2 point.

If I double click, my logs show the first `scene.pick` as undefined, but the second `scene.pick` shows the correct point picked. I can repeat this consistently. It never gets picked on the first click, always on the second (provided I click twice REALLY fast).

var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
    var travailCanvas = $('#travail-canvas');

    // Click handler
    handler.setInputAction(function(movement) {
      console.log(movement);
      var pickedObject = scene.pick(movement.position);
     // if (!pickedObject) pickedObject = scene.pick(movement.position);
      console.log('picked', movement.position, pickedObject);
      if (typeof pickedObject !== 'undefined' && typeof pickedObject.id !== 'undefined') {
        if (typeof pickedObject.id._id !== 'undefined') {
          var info = JSON.parse(pickedObject.id._id);
          if (typeof info.epoch !== 'undefined') {
            var date = Cesium.JulianDate.fromDate(new Date(info.epoch));
            sceneService.getTravail().setTime(date);
          }
        }
        if (typeof pickedObject.id === 'number') {
          sceneService.travail.setPickedActivity(pickedObject.id);
        }
      }
    }, Cesium.ScreenSpaceEventType.LEFT_CLICK);

I've also tried setting the `ScreenSpaceEventType` to `LEFT_DOUBLE_CLICK` which does not return correctly on a double click.

Any ideas on this?

Hello,

I am unable to reproduce this. What kind of entities are you picking?

Have you tried clearing your cache or running chrome in incognito mode? Sometimes things get cached and that can have weird side effects when upgrading to a newer version.

Best,

Hannah

Actually, that might have been related to this issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/3386
That will be fixed for the upcoming 1.18 release, which will be out later today.

Let me know if you are still experiencing the problem in 1.18.

Thanks

Hannah

Thanks so much Hannah,

Actually, I work with chris-cooper sometimes (he filed the bug) and though he must have filed it for his other project, it looks to be the same issue.

I'll give 1.18 a go and see how we make out.

Thanks again,
Pete