# WhileKeyboardVisible Bug on Rotating Device when Keyboard is not visible

**URL:** <https://forums.fusetools.com/t/whilekeyboardvisible-bug-on-rotating-device-when-keyboard-is-not-visible/6037>\
**Category:** Bug Reports\
**Created:** [October 14, 2017, 3:13pm UTC](https://forums.fusetools.com/t/whilekeyboardvisible-bug-on-rotating-device-when-keyboard-is-not-visible/6037 "2017-10-14T15:13:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scotty2nd](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@scotty2nd](https://forums.fusetools.com/u/scotty2nd)\
**Post date:** [October 14, 2017, 3:13pm UTC](https://forums.fusetools.com/t/whilekeyboardvisible-bug-on-rotating-device-when-keyboard-is-not-visible/6037/1 "2017-10-14T15:13:29Z")

</div>

Hello Fuse Community,

i have a bug i use whileKeyboardVisible to move my page to top.

This is working great.

Now i rotate my device the first time all is looking good but when i rotate my device multiple times then i got a white white area on bottom on the Screen (Screenshot).

 ![Screenshot](https://preview.ibb.co/eUuBDw/Screenshot_20171014_164107.png)

Here is my code to reproduce the bug.

Main.ux

```auto
<App>
	<Router ux:Name="router" />

    <DockPanel>
        <StatusBarBackground Dock="Top" />
        <Navigator DefaultPath="login">
        	<LoginPage ux:Template="login" router="router" />
        </Navigator>
        <BottomBarBackground Dock="Bottom" IncludesKeyboard="false" />
    </DockPanel>
</App>

```

Login.ux

```auto
<Page ux:Class="LoginPage">
	<Router ux:Dependency="router" />

	<Image ux:Name="BackgroundImage" File="../assets/background.jpg" Layer="Background" StretchMode="UniformToFill">
		<Blur />
	</Image>

    <!-- Default View -->
    <Panel ux:Name="PortraitContent" Background="#000b">
    	<TextInput />
	</Panel>

	<WhileKeyboardVisible>
		<DebugAction Message="Keyboard"/>
    	<Move Target="this" RelativeTo="Keyboard" Y="-0.5" Duration="0.3"/>
	</WhileKeyboardVisible>
</Page>

```

I have placed a debug action message in whileKeyboardVisible and  
found out that WhileKeyboardVisible is always called when turning the device regardless of whether the keyboard is visible or not.

I use Fuse version 1.2.1, my Operating system is MacOS 10.12.6 and i use a Google Pixel with Android 8.0 for testing.

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [October 16, 2017, 10:09am UTC](https://forums.fusetools.com/t/whilekeyboardvisible-bug-on-rotating-device-when-keyboard-is-not-visible/6037/2 "2017-10-16T10:09:18Z")

</div>

Thanks for reporting! I’ve now logged [a ticket](https://github.com/fusetools/fuselibs-public/issues/583) and you can follow the status there.

---

<div class="post-metadata">

**Author:** ![scotty2nd](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@scotty2nd](https://forums.fusetools.com/u/scotty2nd)\
**Post date:** [October 23, 2017, 4:55pm UTC](https://forums.fusetools.com/t/whilekeyboardvisible-bug-on-rotating-device-when-keyboard-is-not-visible/6037/3 "2017-10-23T16:55:13Z")

</div>

Hey Uldis,

Just for info. I updated Fuse to the newest version (1.3.0) and the problem is still there.

---

<div class="post-metadata">

**Author:** ![scotty2nd](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@scotty2nd](https://forums.fusetools.com/u/scotty2nd)\
**Post date:** [November 10, 2017, 11:43am UTC](https://forums.fusetools.com/t/whilekeyboardvisible-bug-on-rotating-device-when-keyboard-is-not-visible/6037/4 "2017-11-10T11:43:20Z")

</div>

Hey Uldis,

this bug is still present in version 1.4.0
