codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.96k stars 377 forks source link

Mac OS native chinese IME, prompt pos not right. #1409

Closed ilimei closed 4 months ago

ilimei commented 4 months ago

Describe the issue

image when type chinese ime pos will not right.

Browser and platform

(Macintosh; Intel Mac OS X 10_15_7) Chrome/126.0.0.0

Reproduction link

https://codemirror.net/try/?example=Minimal%20editor

ilimei commented 4 months ago
截屏2024-07-18 17 32 07

remove this line will ok。 maybe the first input dom isChange,IME cant find the dom position

marijnh commented 4 months ago

This is a Chrome issue, which I've already reported here, but so far no competent person seems to have picked it up. Sometimes multiple people pressing the +1 button on that issue page (might require logging in) helps getting attention to it.

ilimei commented 4 months ago

Can configuration be added to ignore use the EditContext API? EditContext Api only support in chrome 121

ilimei commented 4 months ago

oh, I find it

if (window.EditContext && view.constructor.EDIT_CONTEXT !== false &&
            // Chrome <126 doesn't support inverted selections in edit context (#1392)
            !(browser.chrome && browser.chrome_version < 126)) {
            this.editContext = new EditContextManager(view);
            if (view.state.facet(editable))
                view.contentDOM.editContext = this.editContext.editContext;
        }

thanks