When keyboard appears setContentOffset is not being called
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- ios, swift
- Área
- mobile-dev
Línea de trabajo
Comienza con el Basic Example y sigue el manejo del teclado alrededor de handleKeyboardDidChangeState, maintainPositionOnInputBarHeightChanged y messagesCollectionView.setContentOffset. Compara ese recorrido con el comportamiento de 3.8 descrito en el issue, usando como referencia los pasos de reproducción y el vídeo. Se considera terminado cuando el offset de la collection view tiene en cuenta la altura del teclado y conserva la posición del mensaje.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
I have updated to 4.3.0 from 3.8.0, and I have noticed, that when text input begins editing/keyboard is displayed, the content of the collection view does not change in 4.3 compared to what happened in 3.8. In 3.8 the collection view content offset is updated to keep the offset when keyboard appears. I have tested it in the examples, and it is also reproducible, here a video link that explains better.
With the update, maintainPositionOnKeyboardFrameChanged has been renamed to maintainPositionOnInputBarHeightChanged, but I assume that is for same purpose.
In 3.8 with maintainPositionOnKeyboardFrameChanged enabled, I can see in the library that messagesCollectionView.setContentOffset is called when handleKeyboardDidChangeState,
while in 4.3 with maintainPositionOnInputBarHeightChanged I can not find any call to messagesCollectionView.setContentOffset.
There is an opened feature requestt, but I think this is a bug introduced in 4.0 version.
To Reproduce
Steps/code to reproduce the behavior:
Preconditions: I have disabled messages socket to avoid other scrolls during testing and scrollsToLastItemOnKeyboardBeginsEditing is disabled to be same configuration than my project.
- Run the example app
- Open "Basic Example"
- Tap on input text bar
Expected behavior
A clear and concise description of what you expected to happen.
MessagesCollectionView offset should be updated to include keyboard height and maintain position
Screenshots
If applicable, add screenshots to help explain your problem.
Link to video
Environment
- What version of MessageKit are you using? Comparing 3.8 vs 4.3
- What version of iOS are you running on? iOS 18
- What version of Swift are you running on? Swift 5.1
- What device(s) are you testing on? Are these simulators? iPhone 15 real device, iPhone 16 Plus and iPhone 16 Pro Max simulators.
- Is the issue you're experiencing reproducible in the example app? Yes, you can check the video.
Additional context
Add any other context about the problem here.
- Lenguaje dominante
- Swift
- Estrellas
- 6.3k
- Forks
- 1.2k
- Merge medio
- 12 h 4 min
- PR fusionados (30 d)
- 9
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 MessageKit/MessageKit
-
Keyboard bug Abiertobug?
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
MessageKit/MessageKit#1901 ·
-
question
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
MessageKit/MessageKit#1888 · 2 comentarios ·
-
Transparent navigation bar in messageInputBar but messagesCollectionView is not shown in these areas Abiertofeature request
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
MessageKit/MessageKit#1884 · 1 comentario ·
-
feature request
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
MessageKit/MessageKit#1880 ·
-
bug?
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
MessageKit/MessageKit#1878 ·
Todos los issues de MessageKit/MessageKit
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
area:general bug P1 security
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
uttrflow/uttrflow-swift#1333 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
maxgoedjen/secretive#840 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
manaflow-ai/cmux#13763 ·