enyojs/moonstone — pull request #1771 by KunmyonChoi (2014-11-18 10:52:49+00:00)
Title: BHV-17002: Outside controls can get focus when contextual popup opened w...

...ith spotlightModal true

This PR is for fixing a regression.

Issue:
What we made change on the previous PR (https://github.com/enyojs/moonstone/pull/1754) is when outside of popup is getting focused then get focus back to popup by capturing event.
But, if user close popup by close button in 5way mode, there is no focus on screen because we get focus back to popup then hide.

Fix:
Hide and then spot on activator. (Not spot then hide)
And I changed the condition to look at modal property also to match condition with capturedKeyDown

DCO-1.1-Signed-Off-By: Kunmyon Choi kunmyon.choi@lge.com