()
| 1524 | if (te.selectionStart != null) { |
| 1525 | if (!ie || (ie && ie_version < 9)) prepareSelectAllHack(); |
| 1526 | var i = 0, poll = function() { |
| 1527 | if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && |
| 1528 | te.selectionEnd > 0 && input.prevInput == "\u200b") |
| 1529 | operation(cm, commands.selectAll)(cm); |
| 1530 | else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500); |
| 1531 | else display.input.reset(); |
| 1532 | }; |
| 1533 | display.detectingSelectAll = setTimeout(poll, 200); |
| 1534 | } |
| 1535 | } |