소스 검색

fix(StatelessDialog.web): Fixes stealing Enter events

j8
yanas 8 년 전
부모
커밋
47b6166d79
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6
    0
      react/features/base/dialog/components/StatelessDialog.web.js

+ 6
- 0
react/features/base/dialog/components/StatelessDialog.web.js 파일 보기

268
      * @returns {void}
268
      * @returns {void}
269
      */
269
      */
270
     _onKeyDown(event) {
270
     _onKeyDown(event) {
271
+        // If the event coming to the dialog has been subject to preventDefault
272
+        // we don't handle it here.
273
+        if (event.defaultPrevented) {
274
+            return;
275
+        }
276
+
271
         if (event.key === 'Enter') {
277
         if (event.key === 'Enter') {
272
             if (this.props.submitDisabled && !this.props.cancelDisabled) {
278
             if (this.props.submitDisabled && !this.props.cancelDisabled) {
273
                 this._onCancel();
279
                 this._onCancel();

Loading…
취소
저장