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

MacOS password field double-click selects a single word #4155

Closed
michael-swan opened this issue May 17, 2021 · 2 comments
Closed

MacOS password field double-click selects a single word #4155

michael-swan opened this issue May 17, 2021 · 2 comments

Comments

@michael-swan
Copy link

Version/Branch of Dear ImGui:

Version: 1.82 (18200)
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_metal.mm + imgui_impl_osx.mm
Compiler: Clang
Operating System: Mac OS X 11.1

My Issue/Question:

Double-clicking on the a password field where the password contains a space causes only the word under the cursor to be selected, revealing the size of words in the password. This only occurs on OS X due to some specific logic I've come across when looking into the issue.

Screenshots/Video

Screen Shot 2021-05-17 at 6 01 26 PM

The above is produced by double-clicking at the end of the line.

Standalone, minimal, complete and verifiable example:
Just compile and run example_apple_metal_macos found in the imgui examples directory.

@ocornut
Copy link
Owner

ocornut commented May 18, 2021

What a fascinating little bug :) thank you!
I will rework the PR to include support for e.g. CTRL+Arrow and other operations.

ocornut added a commit that referenced this issue May 18, 2021
…of spaces when ImGuiInputTextFlags_Password is used. (#4155, #4156) [@michael-swan]
@ocornut
Copy link
Owner

ocornut commented May 18, 2021

I reworked this as 26a1bbf ! Thank you very much.

@ocornut ocornut closed this as completed May 18, 2021
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