gpui: Fix scroll area to support two-layer scrolling in different directions (#31062)
Release Notes: - N/A --- This change is used to solve the problem of not being able to respond correctly in two-layer scrolling (in different directions). This is a common practical requirement. As in the example, in actual use, there may be a scene with a horizontal scroll in a vertical scroll. Before the modification, if we scroll up and down in the area that can scroll horizontally, it will not respond (because it is blocked by the horizontal scroll layer). ## Before https://github.com/user-attachments/assets/e8ea0118-52a5-44d8-b419-639d4b6c0793 ## After https://github.com/user-attachments/assets/aa14ddd7-5596-4dc5-9c6e-278aabdfef8e ---- This change may cause many side effects, causing some scrolling details to be different from before, and more testing and analysis are needed. I have tested some existing scenarios of Zed (such as opening the Branch panel on the Editor and scrolling) and it seems to be correct (but it is possible that I don’t know some interaction details). Here, the person who added this line of code before needs to evaluate the original purpose.
This commit is contained in:
parent
ac806d982b
commit
d9efa2860f
3 changed files with 61 additions and 1 deletions
|
@ -869,6 +869,7 @@ impl InfoPopover {
|
|||
let keyboard_grace = Rc::clone(&self.keyboard_grace);
|
||||
div()
|
||||
.id("info_popover")
|
||||
.occlude()
|
||||
.elevation_2(cx)
|
||||
// Prevent a mouse down/move on the popover from being propagated to the editor,
|
||||
// because that would dismiss the popover.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue