fix issue#739
Merge branch 'master' into issue739
fix only when document.activeElement has focus
Merge remote-tracking branch 'upstream/master' into issue739
Merge remote-tracking branch 'upstream/master' into issue739
store and restore text-selection
Merge remote-tracking branch 'upstream/master' into issue739
add rangeCount before getRangeAt for FireFox exception
only work when option is set
Merge remote-tracking branch 'icoxfog417/issue739' into dev