mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
Fix smooth scroll and other bugs (#1861)
This PR fixes: - The wrong clean up of window post message communicators - The smooth scroll bug in chrome (Fixes Anchor navigation in render view not working #1770) - Scroll by using touch devices in renderer - Lazy loading of the editor (code mirror doesn't need to be lazy loaded any more)
This commit is contained in:
parent
0f3f7a82b5
commit
8b4e9191e5
15 changed files with 260 additions and 213 deletions
|
@ -4,15 +4,16 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
import React, { Fragment, Suspense } from 'react'
|
||||
import { ButtonGroup, ButtonToolbar } from 'react-bootstrap'
|
||||
import { EmojiPickerButton } from './emoji-picker/emoji-picker-button'
|
||||
import { TablePickerButton } from './table-picker/table-picker-button'
|
||||
import styles from './tool-bar.module.scss'
|
||||
import { UploadImageButton } from './upload-image-button'
|
||||
import { ToolbarButton } from './toolbar-button'
|
||||
import { FormatType } from '../../../../redux/note-details/types'
|
||||
|
||||
const EmojiPickerButton = React.lazy(() => import('./emoji-picker/emoji-picker-button'))
|
||||
|
||||
export const ToolBar: React.FC = () => {
|
||||
return (
|
||||
<ButtonToolbar className={`bg-light ${styles.toolbar}`}>
|
||||
|
@ -43,7 +44,9 @@ export const ToolBar: React.FC = () => {
|
|||
<ToolbarButton icon={'minus'} formatType={FormatType.HORIZONTAL_LINE} />
|
||||
<ToolbarButton icon={'caret-square-o-down'} formatType={FormatType.COLLAPSIBLE_BLOCK} />
|
||||
<ToolbarButton icon={'comment'} formatType={FormatType.COMMENT} />
|
||||
<EmojiPickerButton />
|
||||
<Suspense fallback={<Fragment />}>
|
||||
<EmojiPickerButton />
|
||||
</Suspense>
|
||||
</ButtonGroup>
|
||||
</ButtonToolbar>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue