GUACAMOLE-723: Avoid DOM reflow when switching connections.

This commit is contained in:
Michael Jumper
2018-11-12 09:40:32 -08:00
parent 44df0e36e0
commit 2d0bc70214
3 changed files with 35 additions and 2 deletions

View File

@@ -18,6 +18,8 @@
*/ */
.keyboard-container { .keyboard-container {
display: none;
text-align: center; text-align: center;
width: 100%; width: 100%;
@@ -29,4 +31,9 @@
opacity: 0.85; opacity: 0.85;
z-index: 1; z-index: 1;
}
.keyboard-container.open {
display: block;
} }

View File

@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
.text-input-container {
display: none;
}
.text-input-container.open {
display: block;
}

View File

@@ -17,12 +17,12 @@
<div class="client-bottom"> <div class="client-bottom">
<!-- Text input --> <!-- Text input -->
<div class="text-input-container" ng-show="showTextInput"> <div class="text-input-container" ng-class="{ open : showTextInput }">
<guac-text-input needs-focus="showTextInput"></guac-text-input> <guac-text-input needs-focus="showTextInput"></guac-text-input>
</div> </div>
<!-- On-screen keyboard --> <!-- On-screen keyboard -->
<div class="keyboard-container" ng-show="showOSK"> <div class="keyboard-container" ng-class="{ open : showOSK }">
<guac-osk layout="'CLIENT.URL_OSK_LAYOUT' | translate"></guac-osk> <guac-osk layout="'CLIENT.URL_OSK_LAYOUT' | translate"></guac-osk>
</div> </div>