Galapagos icon indicating copy to clipboard operation
Galapagos copied to clipboard

Choosers with `true` and `1` options repeatedly flash on open in Chrome on macOS

Open LaCuneta opened this issue 8 years ago • 2 comments

The minimal case to reproduce is a model with a chooser with options true and 1. Opening the chooser will cause it to repeatedly flash until clicking somewhere else in the model, and the value cannot be updated.

In Firefox the window opens just fine, but both of the values aren't select-able. Jason reports he doesn't see this problem in Opera or Chrome on Linux.

After tracing through the code, the offending line is this call to @ractive.update(). Removing that call removes the unwanted flashing behavior (or unable to select Firefox behavior). The strange thing is the choosers are not being updated in the related code above the call that I can see, so there really isn't anything for Ractive to update with the choosers.

This only affects models that mix 1/true or 0/false in chooser options, which should not be common. The workaround for models that do need both in a chooser would be using alternative strings for the values and converting them in NetLogo code when changed.

LaCuneta avatar Nov 08 '17 17:11 LaCuneta

Bumping the Ractive version to 0.9.9 (from 0.9.0) did not fix the issue.

LaCuneta avatar Nov 08 '17 17:11 LaCuneta

I've also found that, on Linux, this happens in Firefox (but not Chrome) when the Chooser contains a list as an item.

TheBizzle avatar Apr 23 '18 20:04 TheBizzle