Commit 313b5a0
committed
fix: disable context menu on right-click
1. Prevent default context menu from appearing on right-click by
consuming the event in onPressed
2. Disable launcher toggle on touch screen long-press by introducing a
longPressed flag
3. Explicitly define acceptedButtons for left and right mouse buttons
Log: Disabled right-click and long-press context menus on launcher items
Influence:
1. Verify right-clicking a launcher item does not open a context menu
2. Verify long-pressing on a touchscreen does not trigger the launcher
toggle
3. Verify normal left-click still toggles the launcher correctly
fix: 禁用右键和长按菜单
1. 通过在 onPressed 中消费事件,阻止鼠标右键点击时弹出默认上下文菜单
2. 引入 longPressed 标志位,禁用触控屏长按触发启动器切换的功能
3. 显式定义左键和右键的 acceptedButtons
Log: 禁用启动器项上的右键和长按上下文菜单
Influence:
1. 验证鼠标右键点击启动器项不再弹出上下文菜单
2. 验证触控屏长按不再触发启动器切换
3. 验证普通鼠标左键点击仍能正常切换启动器
PMS: BUG-358827
Change-Id: I598c0c4a453ba63df5a3adf74df5260ba6bcf5a61 parent 1abad99 commit 313b5a0
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
387 | 398 | | |
388 | | - | |
| 399 | + | |
389 | 400 | | |
390 | 401 | | |
391 | 402 | | |
| |||
0 commit comments