Skip to content

Commit

Permalink
Feat: modal open 시 input focusing 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhpark42 committed Mar 6, 2021
1 parent 4230004 commit b9b4adf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/js/components/videoSearchModal/VideoSearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default class VideoSearchBar extends Component {
store.subscribe(this.render.bind(this));
}

// TODO : input Focusing
// TODO : ' ' string error 처리
initRender() {
this.$target.innerHTML = `
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/videoSearchModal/VideoSearchModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
updateRequestPending,
updateVideosToBeShown,
} from '../../redux/action.js';
import { ERROR_MESSAGE } from '../../constants/constants.js';

export default class VideoSearchModal extends Component {
constructor($target) {
Expand Down Expand Up @@ -74,6 +73,7 @@ export default class VideoSearchModal extends Component {

onModalShow() {
this.$target.classList.add('open');
this.videoSearchBar.$videoSearchInput.focus();
}

onModalClose() {
Expand Down

0 comments on commit b9b4adf

Please sign in to comment.