Remove use of deprecated functions

This commit is contained in:
Reinis Mazeiks 2022-06-28 23:10:44 +03:00
parent 6932924f57
commit bfcfe2ca5f

View file

@ -11,7 +11,7 @@ use dioxus_html::geometry::{
use dioxus_html::input_data::keyboard_types::{Code, Key, Location, Modifiers}; use dioxus_html::input_data::keyboard_types::{Code, Key, Location, Modifiers};
use dioxus_html::input_data::MouseButtonSet as DioxusMouseButtons; use dioxus_html::input_data::MouseButtonSet as DioxusMouseButtons;
use dioxus_html::input_data::{MouseButton as DioxusMouseButton, MouseButtonSet}; use dioxus_html::input_data::{MouseButton as DioxusMouseButton, MouseButtonSet};
use dioxus_html::{event_bubbles, on::*, KeyCode}; use dioxus_html::{event_bubbles, on::*};
use std::{ use std::{
any::Any, any::Any,
cell::{RefCell, RefMut}, cell::{RefCell, RefMut},
@ -172,8 +172,10 @@ impl InnerInputState {
let old_focus = self.focus_state.last_focused_id; let old_focus = self.focus_state.last_focused_id;
evts.retain(|e| match &e.1 { evts.retain(|e| match &e.1 {
EventData::Keyboard(k) => match k.key_code { EventData::Keyboard(k) => match k.code() {
KeyCode::Tab => !self.focus_state.progress(dom, !k.shift_key), Code::Tab => !self
.focus_state
.progress(dom, !k.modifiers().contains(Modifiers::SHIFT)),
_ => true, _ => true,
}, },
_ => true, _ => true,