Merge pull request #1050 from DioxusLabs/remove-ctrl-r-shortcut

Revert Control R Shortcut
This commit is contained in:
Jon Kelley 2023-05-29 15:00:20 +02:00 committed by GitHub
commit b963452e4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -41,17 +41,10 @@ impl Shortcut {
impl ShortcutRegistry {
pub fn new<T>(target: &EventLoopWindowTarget<T>) -> Self {
let myself = Self {
Self {
manager: Rc::new(RefCell::new(ShortcutManager::new(target))),
shortcuts: Rc::new(RefCell::new(HashMap::new())),
};
// prevent CTRL+R from reloading the page which breaks apps
let _ = myself.add_shortcut(
Some(ModifiersState::CONTROL),
KeyCode::KeyR,
Box::new(|| {}),
);
myself
}
}
pub(crate) fn call_handlers(&self, id: AcceleratorId) {