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

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

Open
LaCuneta opened this issue Nov 8, 2017 · 2 comments

Comments

@LaCuneta
Copy link
Contributor

LaCuneta commented Nov 8, 2017

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
Copy link
Contributor Author

LaCuneta commented Nov 8, 2017

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

@TheBizzle
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants