fixed ligature languages not working well

This commit is contained in:
Jack 2020-10-21 19:46:02 +01:00
parent 788132f59f
commit 8ad119ed16
2 changed files with 8 additions and 3 deletions

View file

@ -1710,11 +1710,14 @@ key {
.word {
margin: 0.25rem;
color: var(--sub-color);
display: flex;
// display: flex;
// transition: 0.25s;
/* margin-bottom: 1px; */
border-bottom: 2px solid transparent;
line-height: 1rem;
letter{
display: inline;
}
// transition: .25s;
.wordInputAfter {

View file

@ -1448,7 +1448,7 @@ function updateCaretPosition() {
let newTop = 0;
let newLeft = 0;
newTop = currentLetterPosTop - letterHeight / 4;
newTop = currentLetterPosTop - Math.round(letterHeight / 20);
if (inputLen == 0) {
newLeft = isLanguageLeftToRight
? currentLetterPosLeft - caret.width() / 2
@ -1493,7 +1493,9 @@ function updateCaretPosition() {
});
}
}
} catch (e) {}
} catch (e) {
console.log('could not move caret: ' + e.message);
}
}
function countChars() {