Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
¿El evento onBlur funciona en Chrome pero no funciona en Safari?

Tengo problemas con el evento onBlur con react-typescript. Para recrear los problemas, presioné upButton para que las noches fueran a 9+ y es el máximo y si el usuario sigue haciendo clic en upButton, aparecerá el error sobre la entrada.

Aquí está la imagen: ingrese la descripción de la imagen aquí y aquí está mi base de código:

 class MvSpinner extends React.Component<Props, MvSpinnerState> { constructor(props:Props) { super(props); this.upButton = this.upButton.bind(this); this.downButton = this.downButton.bind(this); this.clear = this.clear.bind(this); this.drawResult = this.drawResult.bind(this); this.state = { text: "", open: false, showSoftError: false, showHardError: false, }; } upButton() { let currentValue = this.props.value; if (currentValue === this.props.max) { this.setState({ showSoftError: true, showHardError: true }); } if (currentValue < this.props.max && !this.props.disabled) { currentValue++; this.drawResult(); this.onChange(currentValue); } } downButton() { let currentValue = this.props.value; if (currentValue > this.props.min && !this.props.disabled) { currentValue--; this.drawResult(); this.onChange(currentValue); } } clear() { this.setState({ open: true }); } drawResult() { this.setState({ open: false, showSoftError: false, showHardError: false, }); } return ( ... <label className="visuallyhidden" htmlFor={this.props.name}>{this.props.label}</label> {content} <div className="spinner-controls"> <button tabIndex={-1} aria-label="increment" className="spinner-control-up" type="button" onBlur={this.drawResult} onClick={this.upButton} /> <button tabIndex={-1} aria-label="decrement" className="spinner-control-down" type="button" onClick={this.downButton} /> </div> <div className="error tool-tip"> <div className={"tool-tip-popup " + (err ? "show" : "")} style={this.props.errorStyle} > <p>{err}</p> </div> </div> ... );

cuando hago clic fuera del botón arriba, desaparece la información sobre herramientas de error, pero cuando cambio a Safari, no funcionó. Alguien tiene idea de como solucionar este error????

¡¡¡¡Gracias!!!!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

¿Por qué el desenfoque y el enfoque no funcionan en Safari? - intente la búsqueda más simple primero.

Y los componentes de clase ya no se usan.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!