added selection.type fallback check
added selection.type fallback check

for browsers that might not support Selection.isCollapsed property
cjordog/NRLWebsite,rwos/xterm.js,akalipetis/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,cjordog/NRLWebsite,sourcelair/xterm.js,xtermjs/xterm.js,akalipetis/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,cjordog/NRLWebsite,Tyriar/xterm.js,akalipetis/xterm.js,rwos/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,akalipetis/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,cjordog/NRLWebsite,sourcelair/xterm.js