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

Text filters do not work correctly with pasted text #8229

Closed
TheBrokenRail opened this issue Dec 14, 2024 · 1 comment
Closed

Text filters do not work correctly with pasted text #8229

TheBrokenRail opened this issue Dec 14, 2024 · 1 comment

Comments

@TheBrokenRail
Copy link

Version/Branch of Dear ImGui:

551b6c4d662a3938f0cd197e79cc29922feec1ff (on master)

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp

Compiler, OS:

Linux + GCC + Wayland

Full config/build information:

No response

Details:

My Issue/Question:

When copying text into an InputText, filtering (with ImGuiInputTextFlags_CallbackCharFilter or the built-in filters) only partially works.

Blocking certain characters entirely works fine. If you try to paste text into the "imgui" text field in the demo, only the allowed characters are inserted.

The issue is that transforming characters does not work. For instance, if I type a into the uppercase text field in the demo, it gets turned into A. However, if I paste a into the field, it stays lowercase.

Screenshots/Video:

image

Minimal, Complete and Verifiable Example code:

This can be reproduced with the Filtered Text Input section in the demo.

@ocornut
Copy link
Owner

ocornut commented Dec 15, 2024

Thank you for reporting this. I have pushed a fix f5f11e9 now.

@ocornut ocornut closed this as completed Dec 15, 2024
ocornut added a commit that referenced this issue Dec 15, 2024
…callback were not applied when pasting from clipbard. (#8229)
matthew-mccall pushed a commit to matthew-mccall/imgui that referenced this issue Jan 1, 2025
…callback were not applied when pasting from clipbard. (ocornut#8229)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants