Bug 956828 - Change logic for keyboard.is_displayed due to Marionette bug

Change required because of bug 956761