Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tui-ico-date className 을 클릭할 때 에러 발생 #95

Open
jeong-sik opened this issue Nov 2, 2021 · 1 comment
Open

tui-ico-date className 을 클릭할 때 에러 발생 #95

jeong-sik opened this issue Nov 2, 2021 · 1 comment

Comments

@jeong-sik
Copy link

jeong-sik commented Nov 2, 2021

Describe the bug

tui-ico-date className 을 가진 친구가 svg Element 일 경우 util.js 에서 className 을 올바르게 찾지 못해 에러가 납니다.

To Reproduce

Steps to reproduce the behavior:

  1. tui-ico-date className 을 가진 SVG 엘리먼트를 추가
  2. 해당 SVG 엘리먼트를 클릭
  3. 에러가 발생
<div className={wrapperClassName} onClick=handleClick>
    <div className={Cn.\"<:>"("tui-datepicker-input tui-datetime-input tui-has-focus", "")}>
      <input
        type_="text"
        // ref={ReactDOM.Ref.domRef(inputRef)}
        onFocus=handleFocus
        defaultValue=date
        onKeyDown={e => e->ReactEvents.stopSyntheticDefaultEvent}
        id="tui-date-picker-target"
        ariaLabel="Date-Time"
      />
      <Svg.Calendar className="tui-ico-date" height="28px" width="28px" fill="" />
    </div>
    <div
      id="tui-date-picker-container"
      className={Cn.\"<:>"(selectorClassName, style(. [marginTop(px(-1))]))}
    />
</div>

Expected behavior

A clear and concise description of what you expected to happen.
위 코드일 경우 input의 icon 을 클릭할 경우 className 에 직접 접근하다가 오류를 뱉는 경우가 있습니다.

Screenshots

If applicable, add screenshots to help explain your problem.

image

image

Desktop (please complete the following information):

  • OS: macOSX
  • Browser: chrome
  • Version: 95

Additional context

classList 를 쓰고싶긴 한데 IE8 에 없군요

@HarleyWilkins
Copy link

I am also running into this issue when using a button with an icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants