Work around of the accented character suggestion feature in OS X.
Work around of the accented character suggestion feature in OS X.

On OS X, press and hold `c` could show an accent menu to replace `c` with
accented ones like `ć`, there is no corresponding events in W3C, so we
detected it by checking whether the text in input box are selected (this
is how Chrome implemented this feature).

And also note that IME inputs were handled the same way in Chrome, the
compostion text would be marked as selected and got replaced with final
inputs. However the compostion text won't trigger textInput event, so
it's distinguished by checking whether the hiddenInput's value are
changed by Chrome.

Fixes atom/atom-shell#50.

constanzaurzua/atom,phord/atom,lpommers/atom,gisenberg/atom,xream/atom,sxgao3001/atom,hharchani/atom,einarmagnus/atom,hagb4rd/atom,GHackAnonymous/atom,alfredxing/atom,Klozz/atom,fredericksilva/atom,woss/atom,prembasumatary/atom,ezeoleaf/atom,n-riesco/atom,RobinTec/atom,sotayamashita/atom,kjav/atom,ilovezy/atom,AlbertoBarrago/atom,yamhon/atom,0x73/atom,abe33/atom,jeremyramin/atom,Mokolea/atom,Galactix/atom,devmario/atom,Neron-X5/atom,FIT-CSE2410-A-Bombs/atom,SlimeQ/atom,basarat/atom,Shekharrajak/atom,Huaraz2/atom,Dennis1978/atom,Sangaroonaom/atom,vhutheesing/atom,kdheepak89/atom,seedtigo/atom,chengky/atom,bryonwinger/atom,medovob/atom,SlimeQ/atom,folpindo/atom,rlugojr/atom,liuxiong332/atom,hellendag/atom,githubteacher/atom,synaptek/atom,PKRoma/atom,kaicataldo/atom,jacekkopecky/atom,ilovezy/atom,john-kelly/atom,pkdevbox/atom,florianb/atom,scippio/atom,efatsi/atom,rsvip/aTom,ppamorim/atom,bsmr-x-script/atom,jordanbtucker/atom,crazyquark/atom,Andrey-Pavlov/atom,Huaraz2/atom,liuxiong332/atom,Jonekee/atom,liuxiong332/atom,yangchenghu/atom,execjosh/atom,splodingsocks/atom,NunoEdgarGub1/atom,isghe/atom,Rodjana/atom,qiujuer/atom,dsandstrom/atom,Galactix/atom,lovesnow/atom,jlord/atom,tjkr/atom,bcoe/atom,rmartin/atom,abcP9110/atom,BogusCurry/atom,harshdattani/atom,kc8wxm/atom,avdg/atom,pombredanne/atom,ezeoleaf/atom,sebmck/atom,florianb/atom,YunchengLiao/atom,mrodalgaard/atom,nvoron23/atom,RuiDGoncalves/atom,originye/atom,ppamorim/atom,palita01/atom,mrodalgaard/atom,crazyquark/atom,targeter21/atom,Andrey-Pavlov/atom,john-kelly/atom,DiogoXRP/atom,bcoe/atom,jtrose2/atom,vjeux/atom,CraZySacX/atom,NunoEdgarGub1/atom,phord/atom,codex8/atom,gabrielPeart/atom,rxkit/atom,mnquintana/atom,panuchart/atom,0x73/atom,tony612/atom,jeremyramin/atom,Austen-G/BlockBuilder,githubteacher/atom,Jandersoft/atom,folpindo/atom,alexandergmann/atom,pombredanne/atom,paulcbetts/atom,Ingramz/atom,Klozz/atom,ardeshirj/atom,codex8/atom,stuartquin/atom,acontreras89/atom,fredericksilva/atom,chengky/atom,execjosh/atom,chfritz/atom,erikhakansson/atom,gontadu/atom,jjz/atom,sebmck/atom,einarmagnus/atom,vjeux/atom,Andrey-Pavlov/atom,vcarrera/atom,panuchart/atom,Andrey-Pavlov/atom,rmartin/atom,jjz/atom,decaffeinate-examples/atom,nvoron23/atom,fscherwi/atom,deoxilix/atom,ironbox360/atom,yomybaby/atom,yamhon/atom,scv119/atom,kandros/atom,stinsonga/atom,lisonma/atom,CraZySacX/atom,omarhuanca/atom,prembasumatary/atom,fedorov/atom,cyzn/atom,abcP9110/atom,deoxilix/atom,gzzhanghao/atom,prembasumatary/atom,batjko/atom,charleswhchan/atom,sillvan/atom,yamhon/atom,lisonma/atom,matthewclendening/atom,SlimeQ/atom,alexandergmann/atom,vinodpanicker/atom,panuchart/atom,bsmr-x-script/atom,yomybaby/atom,FIT-CSE2410-A-Bombs/atom,RobinTec/atom,harshdattani/atom,oggy/atom,svanharmelen/atom,g2p/atom,targeter21/atom,codex8/atom,fscherwi/atom,prembasumatary/atom,jjz/atom,Hasimir/atom,acontreras89/atom,charleswhchan/atom,bj7/atom,lpommers/atom,davideg/atom,brettle/atom,hakatashi/atom,decaffeinate-examples/atom,rookie125/atom,tjkr/atom,elkingtonmcb/atom,Rychard/atom,constanzaurzua/atom,Andrey-Pavlov/atom,Rychard/atom,burodepeper/atom,boomwaiza/atom,champagnez/atom,gontadu/atom,fredericksilva/atom,toqz/atom,AlexxNica/atom,bcoe/atom,scippio/atom,johnhaley81/atom,bradgearon/atom,Jonekee/atom,lpommers/atom,devmario/atom,cyzn/atom,n-riesco/atom,amine7536/atom,jlord/atom,Jandersoft/atom,qiujuer/atom,targeter21/atom,t9md/atom,mostafaeweda/atom,svanharmelen/atom,jordanbtucker/atom,brettle/atom,constanzaurzua/atom,palita01/atom,seedtigo/atom,rsvip/aTom,ObviouslyGreen/atom,me6iaton/atom,jacekkopecky/atom,AlbertoBarrago/atom,devmario/atom,lovesnow/atom,t9md/atom,liuderchi/atom,Klozz/atom,MjAbuz/atom,bryonwinger/atom,Hasimir/atom,tanin47/atom,woss/atom,GHackAnonymous/atom,deoxilix/atom,kjav/atom,Abdillah/atom,bj7/atom,chengky/atom,AdrianVovk/substance-ide,amine7536/atom,Abdillah/atom,ali/atom,anuwat121/atom,hagb4rd/atom,Jandersoft/atom,Huaraz2/atom,liuderchi/atom,ashneo76/atom,palita01/atom,davideg/atom,vcarrera/atom,xream/atom,Dennis1978/atom,ppamorim/atom,brumm/atom,001szymon/atom,crazyquark/atom,scv119/atom,acontreras89/atom,Locke23rus/atom,dannyflax/atom,BogusCurry/atom,KENJU/atom,kdheepak89/atom,phord/atom,hagb4rd/atom,jacekkopecky/atom,kandros/atom,hakatashi/atom,batjko/atom,n-riesco/atom,liuxiong332/atom,nvoron23/atom,AlbertoBarrago/atom,Galactix/atom,githubteacher/atom,targeter21/atom,qskycolor/atom,basarat/atom,fredericksilva/atom,gisenberg/atom,andrewleverette/atom,bolinfest/atom,Abdillah/atom,russlescai/atom,brettle/atom,charleswhchan/atom,jeremyramin/atom,dannyflax/atom,avdg/atom,sxgao3001/atom,me-benni/atom,wiggzz/atom,synaptek/atom,dsandstrom/atom,kevinrenaers/atom,folpindo/atom,execjosh/atom,toqz/atom,originye/atom,omarhuanca/atom,ilovezy/atom,darwin/atom,ObviouslyGreen/atom,splodingsocks/atom,russlescai/atom,johnrizzo1/atom,johnrizzo1/atom,bsmr-x-script/atom,scv119/atom,Jdesk/atom,russlescai/atom,seedtigo/atom,qskycolor/atom,Austen-G/BlockBuilder,qskycolor/atom,lovesnow/atom,batjko/atom,johnhaley81/atom,fedorov/atom,fang-yufeng/atom,GHackAnonymous/atom,rsvip/aTom,hakatashi/atom,ardeshirj/atom,CraZySacX/atom,tony612/atom,sillvan/atom,gisenberg/atom,mnquintana/atom,Jdesk/atom,codex8/atom,kittens/atom,ivoadf/atom,helber/atom,KENJU/atom,hpham04/atom,MjAbuz/atom,davideg/atom,ironbox360/atom,jtrose2/atom,lisonma/atom,andrewleverette/atom,targeter21/atom,AlisaKiatkongkumthon/atom,tmunro/atom,bencolon/atom,Ju2ender/atom,ali/atom,ivoadf/atom,kandros/atom,chfritz/atom,h0dgep0dge/atom,atom/atom,jacekkopecky/atom,rjattrill/atom,devmario/atom,kittens/atom,MjAbuz/atom,burodepeper/atom,Arcanemagus/atom,Ju2ender/atom,mertkahyaoglu/atom,Sangaroonaom/atom,Jandersolutions/atom,tisu2tisu/atom,gzzhanghao/atom,abcP9110/atom,decaffeinate-examples/atom,Locke23rus/atom,vcarrera/atom,sebmck/atom,devoncarew/atom,isghe/atom,Ju2ender/atom,oggy/atom,AlexxNica/atom,me6iaton/atom,toqz/atom,vjeux/atom,tisu2tisu/atom,kc8wxm/atom,davideg/atom,isghe/atom,ralphtheninja/atom,anuwat121/atom,davideg/atom,chengky/atom,synaptek/atom,hellendag/atom,pkdevbox/atom,transcranial/atom,kaicataldo/atom,Neron-X5/atom,crazyquark/atom,001szymon/atom,transcranial/atom,paulcbetts/atom,beni55/atom,john-kelly/atom,dannyflax/atom,g2p/atom,kevinrenaers/atom,sxgao3001/atom,vhutheesing/atom,rookie125/atom,FoldingText/atom,omarhuanca/atom,daxlab/atom,Jandersoft/atom,n-riesco/atom,crazyquark/atom,mnquintana/atom,nrodriguez13/atom,Rodjana/atom,yalexx/atom,scippio/atom,transcranial/atom,ezeoleaf/atom,stuartquin/atom,originye/atom,deepfox/atom,woss/atom,pkdevbox/atom,NunoEdgarGub1/atom,Jdesk/atom,vinodpanicker/atom,rookie125/atom,nvoron23/atom,synaptek/atom,anuwat121/atom,champagnez/atom,bradgearon/atom,jlord/atom,yomybaby/atom,PKRoma/atom,tanin47/atom,KENJU/atom,liuxiong332/atom,PKRoma/atom,sebmck/atom,Abdillah/atom,fedorov/atom,AdrianVovk/substance-ide,yomybaby/atom,jtrose2/atom,nucked/atom,gisenberg/atom,jtrose2/atom,sekcheong/atom,Galactix/atom,cyzn/atom,lisonma/atom,avdg/atom,russlescai/atom,0x73/atom,kjav/atom,GHackAnonymous/atom,darwin/atom,erikhakansson/atom,tisu2tisu/atom,G-Baby/atom,yalexx/atom,sotayamashita/atom,batjko/atom,bencolon/atom,kdheepak89/atom,rmartin/atom,KENJU/atom,AlexxNica/atom,qskycolor/atom,Dennis1978/atom,elkingtonmcb/atom,ReddTea/atom,hagb4rd/atom,pombredanne/atom,pombredanne/atom,niklabh/atom,matthewclendening/atom,sebmck/atom,Rodjana/atom,Ingramz/atom,abcP9110/atom,hpham04/atom,ali/atom,me-benni/atom,liuderchi/atom,FoldingText/atom,johnhaley81/atom,hellendag/atom,rlugojr/atom,mostafaeweda/atom,G-Baby/atom,brumm/atom,jacekkopecky/atom,Jandersolutions/atom,0x73/atom,Hasimir/atom,FoldingText/atom,kc8wxm/atom,sekcheong/atom,matthewclendening/atom,yomybaby/atom,rjattrill/atom,acontreras89/atom,kjav/atom,GHackAnonymous/atom,vhutheesing/atom,pengshp/atom,yalexx/atom,Jdesk/atom,RuiDGoncalves/atom,ironbox360/atom,qiujuer/atom,wiggzz/atom,YunchengLiao/atom,vinodpanicker/atom,andrewleverette/atom,alfredxing/atom,decaffeinate-examples/atom,devoncarew/atom,sillvan/atom,daxlab/atom,fang-yufeng/atom,Neron-X5/atom,mostafaeweda/atom,mrodalgaard/atom,ashneo76/atom,bryonwinger/atom,KENJU/atom,hagb4rd/atom,Austen-G/BlockBuilder,fscherwi/atom,gzzhanghao/atom,hpham04/atom,splodingsocks/atom,ilovezy/atom,Hasimir/atom,ykeisuke/atom,rmartin/atom,001szymon/atom,qskycolor/atom,jlord/atom,codex8/atom,Ju2ender/atom,Arcanemagus/atom,Austen-G/BlockBuilder,Sangaroonaom/atom,ppamorim/atom,ykeisuke/atom,russlescai/atom,Locke23rus/atom,wiggzz/atom,kaicataldo/atom,woss/atom,bencolon/atom,rsvip/aTom,stinsonga/atom,me6iaton/atom,matthewclendening/atom,Jdesk/atom,vinodpanicker/atom,ali/atom,johnrizzo1/atom,dijs/atom,beni55/atom,tanin47/atom,nrodriguez13/atom,dkfiresky/atom,gisenberg/atom,alexandergmann/atom,Austen-G/BlockBuilder,ezeoleaf/atom,constanzaurzua/atom,kjav/atom,dkfiresky/atom,devoncarew/atom,liuderchi/atom,stinsonga/atom,helber/atom,mnquintana/atom,brumm/atom,jtrose2/atom,bj7/atom,Galactix/atom,stinsonga/atom,ykeisuke/atom,harshdattani/atom,yalexx/atom,ralphtheninja/atom,daxlab/atom,efatsi/atom,jjz/atom,charleswhchan/atom,RuiDGoncalves/atom,boomwaiza/atom,YunchengLiao/atom,Mokolea/atom,nvoron23/atom,chengky/atom,splodingsocks/atom,me-benni/atom,AlisaKiatkongkumthon/atom,sillvan/atom,darwin/atom,scv119/atom,rmartin/atom,bolinfest/atom,gabrielPeart/atom,yalexx/atom,paulcbetts/atom,gabrielPeart/atom,john-kelly/atom,matthewclendening/atom,SlimeQ/atom,bolinfest/atom,synaptek/atom,kevinrenaers/atom,beni55/atom,acontreras89/atom,h0dgep0dge/atom,prembasumatary/atom,Arcanemagus/atom,erikhakansson/atom,isghe/atom,bradgearon/atom,Jandersoft/atom,Jandersolutions/atom,oggy/atom,mertkahyaoglu/atom,kc8wxm/atom,ardeshirj/atom,helber/atom,xream/atom,Shekharrajak/atom,oggy/atom,fang-yufeng/atom,hharchani/atom,h0dgep0dge/atom,omarhuanca/atom,dijs/atom,pombredanne/atom,sekcheong/atom,mdumrauf/atom,tony612/atom,florianb/atom,batjko/atom,elkingtonmcb/atom,tmunro/atom,lovesnow/atom,sxgao3001/atom,Neron-X5/atom,dannyflax/atom,G-Baby/atom,champagnez/atom,jordanbtucker/atom,medovob/atom,qiujuer/atom,alfredxing/atom,deepfox/atom,basarat/atom,MjAbuz/atom,tony612/atom,omarhuanca/atom,yangchenghu/atom,oggy/atom,ObviouslyGreen/atom,Mokolea/atom,kittens/atom,dkfiresky/atom,basarat/atom,ReddTea/atom,pengshp/atom,basarat/atom,hpham04/atom,rsvip/aTom,ivoadf/atom,einarmagnus/atom,jlord/atom,Hasimir/atom,fredericksilva/atom,ashneo76/atom,NunoEdgarGub1/atom,Jandersolutions/atom,einarmagnus/atom,mertkahyaoglu/atom,mertkahyaoglu/atom,tjkr/atom,FoldingText/atom,t9md/atom,mdumrauf/atom,svanharmelen/atom,hakatashi/atom,Shekharrajak/atom,sekcheong/atom,pengshp/atom,bryonwinger/atom,hpham04/atom,AdrianVovk/substance-ide,niklabh/atom,RobinTec/atom,mostafaeweda/atom,gontadu/atom,dannyflax/atom,rjattrill/atom,n-riesco/atom,charleswhchan/atom,fang-yufeng/atom,rjattrill/atom,rlugojr/atom,rxkit/atom,FoldingText/atom,jacekkopecky/atom,vcarrera/atom,nucked/atom,Austen-G/BlockBuilder,kittens/atom,abe33/atom,dsandstrom/atom,boomwaiza/atom,sillvan/atom,abcP9110/atom,atom/atom,jjz/atom,efatsi/atom,paulcbetts/atom,hharchani/atom,mostafaeweda/atom,bcoe/atom,fedorov/atom,NunoEdgarGub1/atom,MjAbuz/atom,isghe/atom,YunchengLiao/atom,fang-yufeng/atom,amine7536/atom,YunchengLiao/atom,atom/atom,bcoe/atom,yangchenghu/atom,mdumrauf/atom,mertkahyaoglu/atom,dijs/atom,Ju2ender/atom,Jandersolutions/atom,dsandstrom/atom,SlimeQ/atom,vinodpanicker/atom,ali/atom,me6iaton/atom,mnquintana/atom,Abdillah/atom,ReddTea/atom,florianb/atom,g2p/atom,Ingramz/atom,DiogoXRP/atom,RobinTec/atom,ReddTea/atom,me6iaton/atom,kc8wxm/atom,vjeux/atom,tony612/atom,deepfox/atom,kdheepak89/atom,sotayamashita/atom,FIT-CSE2410-A-Bombs/atom,vjeux/atom,chfritz/atom,florianb/atom,sekcheong/atom,BogusCurry/atom,john-kelly/atom,hharchani/atom,Jonekee/atom,AlisaKiatkongkumthon/atom,FoldingText/atom,rxkit/atom,Neron-X5/atom,Rychard/atom,ReddTea/atom,kittens/atom,kdheepak89/atom,ralphtheninja/atom,hharchani/atom,dannyflax/atom,dsandstrom/atom,Shekharrajak/atom,sxgao3001/atom,medovob/atom,deepfox/atom,nrodriguez13/atom,devoncarew/atom,nucked/atom,amine7536/atom,amine7536/atom,stuartquin/atom,abe33/atom,dkfiresky/atom,qiujuer/atom,basarat/atom,constanzaurzua/atom,toqz/atom,lovesnow/atom,einarmagnus/atom,devmario/atom,toqz/atom,devoncarew/atom,RobinTec/atom,niklabh/atom,fedorov/atom,lisonma/atom,woss/atom,tmunro/atom,Shekharrajak/atom,ilovezy/atom,ppamorim/atom,burodepeper/atom,h0dgep0dge/atom,DiogoXRP/atom,dkfiresky/atom,deepfox/atom,vcarrera/atom