useBeforeUnload's message parameter not used by modern browsers
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Start by locating the useBeforeUnload hook and its documentation, then inspect any related tests or examples; the issue names no files or test entry points. Compare the current parameter behavior with the documented API and determine whether the project wants an API change or documentation clarification. Done means the chosen behavior is reflected consistently in the hook, documentation, and relevant tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
The useBeforeUnload hook takes two params:
enabled: boolean | (() => boolean) = truemessage: A string to be displayed in the dialog
The problem is that modern browsers do NOT allow a custom message on the dialog that is shown a result of beforeUnload event, making the second parameter irrelevant.
Describe the solution you'd like
Remove the message parameter and default its value to true for legacy browsers. I understand this would be a breaking change, and less desired.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
An alternative is to just update the documentation to indicate message would only be used as a truthy value for event.returnType and its effect will only apply in legacy browsers. Modern browsers will not use the message provided to be displayed in the dialog.
- Lenguaje dominante
- TypeScript
- Estrellas
- 44k
- Forks
- 3.3k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de streamich/react-use
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Add Generic Fn for useDebouncePosiblemente ocupada @itsmejay80 la tomó hace 194 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
-
useVideo.story.tsx - sampleVideo can not be loadedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
-
useSlider: event callbacks are not updatedPosiblemente ocupada @erykpiast la tomó hace 1841 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Todos los issues de streamich/react-use
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Nimblesite/SharpLsp#468 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Bundled uv is never updated and trusts the compromised eMudhra certificatesPosiblemente ocupada @FabienDanieau la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
bg_wait's blocking mode (stopOnAttention: false) is under-documented and effectively undiscoverableAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
nicobailon/pi-subagents#3019 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
db-ux-design-system/core-web#8613 ·
Los mantenedores suelen responder en 1 día