workaround for broken test

pull/483/head
nightwing 2018-01-23 20:34:44 +04:00
rodzic 6184b3de78
commit d76c57b79e
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -640,6 +640,13 @@ Editor.$uid = 0;
* Brings the current `textInput` into focus.
**/
this.focus = function() {
// Safari needs the timeout
// iOS and Firefox need it called immediately
// to be on the save side we do both
var _self = this;
setTimeout(function() {
_self.textInput.focus();
});
this.textInput.focus();
};

Wyświetl plik

@ -211,7 +211,7 @@ var Selection = function(session) {
* Selects all the text in the document.
**/
this.selectAll = function() {
this.anchor.setPosition(0, 0);
this.setSelectionAnchor(0, 0);
this.cursor.setPosition(Number.MAX_VALUE, Number.MAX_VALUE);
};