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

ENYO-4916: Fix MarqueeDecorator internal focus state #1322

Closed
wants to merge 2 commits into from

Conversation

germboy
Copy link
Contributor

@germboy germboy commented Nov 21, 2017

Issue Resolved / Feature Added

The internal state of MarqueeDecorator can be wrong within a focused control that becomes disabled, resulting in the marquee starting or continuing when it should be stopped.

Resolution

Update the internal state of the component when it receives props to be disabled. This seems to be the most straight-forward and least intrusive solution for this issue.

Additional Considerations

There is an alternative fix that involves updating the state when an onSpotlightDisappear event is emitted. I've opted against this for the time being due to various factors.

There is a related bug where a disabled component will not emit a blur event. While we cannot use blur to update internal state in MarqueeDecorator, we could use onSpotlightDisappear. However, updating the internal state based on that event could be problematic as Spottable does not update its own internal state in this case - meaning the internal "spotted" state would be out-of-sync between MarqueeDecorator and Spottable. Focused Spottable controls that become disabled still retain an internal spotted state in Spottable, which ultimately affect when onSpotlightDisappear events are emitted. I could update this Spottable behavior as well, but it's a) much more intrusive and impacts many more components and b) could cause issues if/when the blur issue is resolved.

I'm open to input/discussion.

Enact-DCO-1.0-Signed-off-by: Jeremy Thomas jeremy.thomas@lge.com

@ryanjduffy
Copy link
Contributor

The original bug doesn't reproduce under the prior conditions due to the change to maintain focus when becoming disabled. Closing this PR under the assumption that if it were to be required, the code will have diverged enough that this change would need revisited anyway.

@ryanjduffy ryanjduffy closed this May 15, 2018
@ryanjduffy ryanjduffy deleted the feature/ENYO-4916-jeremythomas branch May 15, 2018 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants