ajaxorg / ace

Ace (Ajax.org Cloud9 Editor)

Home Page:https://ace.c9.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gutter tooltip position inside container

alitan opened this issue · comments

Describe the bug

Gutter tooltip position (which is currently calculated for fixed positioning container), is not working when the editor is in a container div. The new container queries and container-type: size or container-type: inline-size for parent breaks the fixed positioning.

Expected Behavior

Gutter tooltip position being calculated properly, either following mouse or not.

Current Behavior

Gutter tooltip position is not correct ( working as relative positioning) when the parent container has container query.

Reproduction Steps

Assing container query on the parent for the editor.

Possible Solution

Gutter tooltip can be handled like Autocomplete popup content. (append to body). That way it will not be affected by editors parent positioning and container css attribute.

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

1.32.8 / Chrome / Windows

Hey @alitan, thank you for the report. Could you please attach a small example with an editor in a div using container queries, where you the issue is reproducible?

hello, here is an example that i put together on codepen. >> https://codepen.io/alitan/pen/rNbGOQE
if you resize the browser small enough (so that you see the container query kicking in) and rollover the "x" gutter mark you will see that the tooltip is not in the right place.