본문 바로가기

크롬 마지막 글자 사라짐 현상

액트 2019. 6. 13.
반응형

크롬 마지막 글자 사라지는 현

크롬 최신 버전인 75.0.3770.80(공식 빌드) (64비트) 에서 타이밍 후 마지막 글자가 사라지는 현상이 발생하고 있습니다.

크롬 버전은 아래 사진과 같이 확인할 수 있습니다.

이 현상을 해결하는 방법은 두가지가 있습니다.

 

1. 최신 카나리아 설

현재 배타버전에서도 아직 수정이 안된 버그입니다.

따라서 최신 카나리 77.0.3815.0 버전을 받아 설치하시면 됩니다.

다만 카나리아 버전인 만큼. 이외의 다른 버그들이 있을것입니다.

[ 관련 글 : https://bugs.chromium.org/p/chromium/issues/detail?id=966148&q=korean&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified  ]

[ 카나리아 설치 : https://www.google.com/intl/ko/chrome/canary/  ]

 

2. 커서 재설정 스크립트를 통해 글자가 사라지는 버그 해결하

[ 출처 : https://www.clien.net/service/board/lecture/13577755  ]

[ 확장프로그램 설치: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo ]

크롬 스토어에서 Tampermonkey를 설치하시고, [새 스크립트 만들기]를 누른 후, 아래 내용을 복사 붙여넣기 하세요

 

 

(Tampermonkey 아이콘 누르면 나오는 메뉴에서, 아래 버튼 클릭)

(function(){

     'use strict';

     let target;

     let cursor;

     const sel = document.getSelection();

      document.addEventListener("keyup", function(e){

         target = (e.target.isContentEditable ||

                   e.target.nodeName === "TEXTAREA" ||

                   (e.target.nodeName === 'INPUT' && (e.target.type === "text" || e.target.type === "search" || e.target.type === "email" || e.target.type === "url"))                  ) ? e.target : null;

         cursor = (target && typeof target.value === "undefined") ? [ sel.focusNode, sel.focusOffset ] : null;

     });

    document.addEventListener("mousemove", function(){

        if(target){             target.blur();

             target.focus();

             cursor && sel.collapse(cursor[0], cursor[1]);

             target = null;

         }

     });

 })();

 

반응형

댓글