fix(shortcuts): ignore keyboard input when replace dialog is active

This commit is contained in:
Ashley Wulber 2025-09-23 23:25:49 -04:00 committed by Ashley Wulber
parent 78df139ded
commit 34ec1bc654
2 changed files with 5 additions and 2 deletions

View file

@ -614,7 +614,7 @@ impl Model {
&self,
_core: &cosmic::Core,
) -> cosmic::iced::Subscription<ShortcutMessage> {
if self.editing.is_some() {
if self.editing.is_some() && self.replace_dialog.is_none() {
listen_with(|event, _, _| match event {
iced::event::Event::Keyboard(iced::keyboard::Event::KeyPressed {
key,

View file

@ -548,7 +548,10 @@ impl page::Page<crate::pages::Message> for Page {
use cosmic::iced::{self, event::listen_with};
cosmic::iced::Subscription::batch(vec![
if self.add_shortcut.active && self.add_shortcut.editing.is_some() {
if self.add_shortcut.active
&& self.add_shortcut.editing.is_some()
&& self.replace_dialog.is_empty()
{
listen_with(|event, _, _| match event {
iced::event::Event::Keyboard(iced::keyboard::Event::KeyPressed {
key,