ajaxorg / ajaxorg/ace

completer: popup positioning is wrong for transformed editor

未關閉
#5,688 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug effort/medium p2
主要語言
JavaScript
星號
27.1k
分支
5.3k
PR 合併指標
30 天內沒有已合併 PR

描述

### Describe the bug

I have an editor that is css-transformed (scaling and translation). The editor is working well thanks to the `hasCssTransforms` config property. However the completer popup is completely mis-positionned:
![image](https://github.com/user-attachments/assets/0571b215-a05b-4b8d-904c-ca2886cad474)

### Expected Behavior

I would expect the popup to be positioned according to the transformed editor no matter its scaling/translation.

### Current Behavior

The popup is positioning according to absolute screen coordinates.

### Reproduction Steps

## index.html
```html


ACE in Action

#editor {
width: 1400px;
height: 1400px;
position: absolute;
transform: scale(0.4) translate(200px, 200px);
left: 0, top: 0;
}
.wrapper {
background-color: red;
width: 50000px;
height: 50000px;
position: relative;
}





function foo(items) { var x = "All this is syntax highlighted";
return x; }




var editor = ace.edit("editor", {
mode: "ace/mode/javascript",
theme: "ace/theme/merbivore",
fontSize: 20,
hasCssTransforms: true,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true,
});
editor.setTheme("ace/theme/monokai");
editor.session.setMode("ace/mode/javascript");

```

![image](https://github.com/user-attachments/assets/553e53d0-5392-48d4-9724-94d53b938b11)

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### Ace Version / Browser / OS / Keyboard layout

1.36.5 / Chrome 131.0

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。