Fix problem scrolling overflowing editor content.
This commit is contained in:
parent
17547c7434
commit
44e0692596
@ -1,4 +1,4 @@
|
||||
use std::{ops::Deref, rc::Rc, str::FromStr};
|
||||
use std::{ops::Deref, rc::Rc};
|
||||
|
||||
use crate::{
|
||||
command_handler::execute_queue, FrameId, GlobalLayoutState, GlobalMemoCell, PanelDirection,
|
||||
@ -10,8 +10,7 @@ use delete_script_dialog::DeleteScriptDialog;
|
||||
use editor_area::EditorArea;
|
||||
use editor_nav::EditorNav;
|
||||
use storage::fetch_initial_editor_state;
|
||||
use wasm_bindgen_futures::js_sys::JsString;
|
||||
use web_sys::{console, KeyboardEvent};
|
||||
use web_sys::KeyboardEvent;
|
||||
use yew::{
|
||||
function_component, html, use_node_ref, use_state_eq, AttrValue, Callback, Html, Properties,
|
||||
UseStateHandle,
|
||||
@ -163,7 +162,6 @@ pub fn editor_view(props: &EditorViewProps) -> Html {
|
||||
let global_memo = props.global_memo.clone();
|
||||
let kb_editor_state = editor_state.clone();
|
||||
|
||||
console::log_1(&JsString::from_str(&format!("{:?}", editor_state.as_ref())).unwrap());
|
||||
html! {
|
||||
<div class="w-100 h-100" onkeydown={keyboard_handler(kb_editor_state, global_memo, global_layout, set_err, frame)} ref={editor_ref.clone()}>
|
||||
{if editor_state.show_create_dialog {
|
||||
|
@ -315,7 +315,9 @@ pub(super) fn editor_area(props: &EditorViewDetailProps) -> Html {
|
||||
}
|
||||
});
|
||||
html! {
|
||||
<div class="editorarea" ref={node_ref.clone()}>
|
||||
<div class="d-flex w-100 h-100 flex-column">
|
||||
<div class="editorarea flex-grow-1 flex-shrink-1 d-flex flex-row" ref={node_ref.clone()}>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
@ -78,4 +78,10 @@ body {
|
||||
}
|
||||
.editorarea {
|
||||
color: white;
|
||||
min-width: 1px;
|
||||
min-height: 1px;
|
||||
}
|
||||
.cm-editor {
|
||||
min-width: 1px;
|
||||
min-height: 1px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user