Просмотр исходного кода

Merge pull request #8705 from overleaf/ii-cm6-advanced-references-search-close

[cm6] Prevent the moving of cursor to the top of the document

GitOrigin-RevId: 3cc3c2c260a668f96ff7f6b6f1dcf7edf33ed6c7
ilkin-overleaf 4 лет назад
Родитель
Сommit
0055858629
1 измененных файлов с 2 добавлено и 7 удалено
  1. 2 7
      services/web/frontend/js/shared/components/accessible-modal.tsx

+ 2 - 7
services/web/frontend/js/shared/components/accessible-modal.js → services/web/frontend/js/shared/components/accessible-modal.tsx

@@ -1,11 +1,10 @@
 import { useCallback } from 'react'
-import PropTypes from 'prop-types'
-import { Modal } from 'react-bootstrap'
+import { Modal, ModalProps } from 'react-bootstrap'
 
 // a bootstrap Modal with its `aria-hidden` attribute removed. Visisble modals
 // should not have their `aria-hidden` attribute set but that's a bug in our
 // version of react-bootstrap.
-function AccessibleModal({ show, ...otherProps }) {
+function AccessibleModal({ show, ...otherProps }: ModalProps) {
   // use a callback ref to track the modal. This will re-run the function
   // when the element node or any of the dependencies are updated
   const setModalRef = useCallback(
@@ -29,8 +28,4 @@ function AccessibleModal({ show, ...otherProps }) {
   return <Modal show={show} {...otherProps} ref={setModalRef} />
 }
 
-AccessibleModal.propTypes = {
-  show: PropTypes.bool,
-}
-
 export default AccessibleModal