Skip to content

[Bug]: 当存在多个input时,enter其中第一个input同时清空第二个input, 清空的行为无法被record #1713

@SusanXu123

Description

@SusanXu123

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.18

Expected Behavior

多个input输入框,操作某一个输入框同时变更另一个输入框的输入值时,2个输入框的输入值变动都可以被record

Actual Behavior

多个input输入框,操作某一个输入框同时变更另一个输入框的输入值时,另外一个输入框的输入值变动无法被record

Steps to Reproduce

page code:
`
import { record } from '@rrweb/record'
const Page= () => {
const [value1, setValue1] = useState('')
const [value2, setValue2] = useState('')
useEffect(() => {
record({
recordCanvas: true,
emit(event) {
// ....
}
})
}, []);
return (
<>
<input
style={{ width: '300px', marginTop: 20 }}
value={value2}
onChange={e => {
setValue2(e.target.value)

    }}
  />
  <input
    style={{ width: '300px', marginTop: 20 }}
    value={value1}
    onChange={e => {
      setValue1(e.target.value)
    }}
    onKeyDown={e => {
      if (e.key === 'Enter') {
        setValue2('')
      }
    }}
  />
</>

)
}
`
action:

  1. 随意输入第一个input
  2. 随意输入第二个input后enter,此时第一个input被清空,但是回放对应的events,发现视频的最后,第一个event的输入值并没有被清空

实际结果:

Image

回放结果:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions