@24i/bigscreen-sdk 1.0.5 → 1.0.6-alpha.2139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, createRef, Reference } from '@24i/bigscreen-sdk/jsx';
|
|
2
2
|
import { getKeyDigit } from '@24i/bigscreen-sdk/device';
|
|
3
|
+
import { isRtl } from '@24i/bigscreen-sdk/i18n';
|
|
3
4
|
import { EventsManager } from '@24i/bigscreen-sdk/events-manager';
|
|
4
5
|
import {
|
|
5
6
|
Matrix,
|
|
@@ -208,7 +209,9 @@ export abstract class KeyboardBase<
|
|
|
208
209
|
* Moves caret 1 position to the left.
|
|
209
210
|
*/
|
|
210
211
|
onLeft() {
|
|
211
|
-
const newPosition =
|
|
212
|
+
const newPosition = !isRtl()
|
|
213
|
+
? caretLeft(this.inputElement)
|
|
214
|
+
: caretRight(this.inputElement);
|
|
212
215
|
if (typeof newPosition === 'number') {
|
|
213
216
|
this.updateCaretPosition(newPosition);
|
|
214
217
|
}
|
|
@@ -218,7 +221,9 @@ export abstract class KeyboardBase<
|
|
|
218
221
|
* Moves caret 1 position to the right.
|
|
219
222
|
*/
|
|
220
223
|
onRight() {
|
|
221
|
-
const newPosition =
|
|
224
|
+
const newPosition = !isRtl()
|
|
225
|
+
? caretRight(this.inputElement)
|
|
226
|
+
: caretLeft(this.inputElement);
|
|
222
227
|
if (typeof newPosition === 'number') {
|
|
223
228
|
this.updateCaretPosition(newPosition);
|
|
224
229
|
}
|