There was an error while loading. Please reload this page.
1 parent 33d7d1a commit bd20807Copy full SHA for bd20807
1 file changed
javascript/atoms/keyboard.js
@@ -812,7 +812,9 @@ bot.Keyboard.prototype.updateOnHomeOrEnd_ = function(key) {
812
*/
813
bot.Keyboard.checkCanUpdateSelection_ = function(element) {
814
try {
815
- element.selectionStart;
+ if (typeof element.selectionStart == 'number') {
816
+ return;
817
+ }
818
} catch (ex) {
819
// The native error message is actually pretty informative, just add a
820
// reference to the relevant Chrome bug to provide more context.
@@ -823,6 +825,7 @@ bot.Keyboard.checkCanUpdateSelection_ = function(element) {
823
825
}
824
826
throw ex;
827
828
+ throw Error('Element does not support selection');
829
};
830
831
0 commit comments