gpui: Press enter
, space
to trigger click to focused element (#35075)
Release Notes: - N/A > Any user interaction that is equivalent to a click, such as pressing the Space key or Enter key while the element is focused. Note that this only applies to elements with a default key event handler, and therefore, excludes other elements that have been made focusable by setting the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex) attribute. https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event --------- Co-authored-by: Anthony <anthony@zed.dev> Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com> Co-authored-by: Umesh Yadav <23421535+imumesh18@users.noreply.github.com>
This commit is contained in:
parent
b7469f5bc3
commit
0025019db4
19 changed files with 231 additions and 63 deletions
|
@ -106,14 +106,14 @@ impl Render for PlatformTitleBar {
|
|||
// Note: On Windows the title bar behavior is handled by the platform implementation.
|
||||
.when(self.platform_style == PlatformStyle::Mac, |this| {
|
||||
this.on_click(|event, window, _| {
|
||||
if event.up.click_count == 2 {
|
||||
if event.click_count() == 2 {
|
||||
window.titlebar_double_click();
|
||||
}
|
||||
})
|
||||
})
|
||||
.when(self.platform_style == PlatformStyle::Linux, |this| {
|
||||
this.on_click(|event, window, _| {
|
||||
if event.up.click_count == 2 {
|
||||
if event.click_count() == 2 {
|
||||
window.zoom_window();
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue