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

fixed: selection and backspace are recently broken in CPTokenField #2894

Open
wants to merge 1 commit into
base: narwhal
Choose a base branch
from

Conversation

daboe01
Copy link
Contributor

@daboe01 daboe01 commented Mar 22, 2020

this bug was introduced by commit 26aab29
26aab29 was meant to improve iOS experience but makes the tokenfield loose FR status prematurely.
this PR helps CPTokenField to regain FR status after bluring the inputfield by clicking on a token.
it secondly compensates for the backspace event not being propagated anymore in all circumstances
fixes #2795

this bug was introduced by commit 26aab29
 26aab29 was meant to improve iOS experience but makes the tokenfield loose FR status prematurely
@cappbot cappbot added this to the Someday milestone Mar 22, 2020
@cappbot cappbot added the #new label Mar 22, 2020
@cappbot
Copy link

cappbot commented Mar 22, 2020

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 23, 2020

-#new
+AppKit
+#needs-review
+regression

@cappbot
Copy link

cappbot commented Mar 23, 2020

Milestone: Someday. Labels: #needs-review, AppKit, regression. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 23, 2020

works with FF/chrome/safari, all tested on mac

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 23, 2020

found something: clicking between two tokens does not give us a cursor as it should.

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 23, 2020

+#needs-improvement

@cappbot
Copy link

cappbot commented Mar 23, 2020

Milestone: Someday. Labels: #needs-improvement, #needs-review, AppKit, regression. What's next?

  • This issue is pending an architectural or implementation design decision and should be discussed or voted on.
  • The code for this issue has problems with formatting or fails a capp_lint check, has bugs, or has non-optimal logic or algorithms. It should be improved upon.

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 25, 2020

i just tested an old version of cappuccino and it turns out that clicking between two tokens never worked.

-#needs-improvement

@cappbot
Copy link

cappbot commented Mar 25, 2020

Milestone: Someday. Labels: #needs-review, AppKit, regression. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

@daboe01
Copy link
Contributor Author

daboe01 commented Nov 8, 2020

@mrcarlberg would you prefer a runloop approach (not tested though)?

[[CPRunLoop currentRunLoop] performSelector:@selector(makeFirstResponder:) target:[self window] argument:self order:0 modes:[CPDefaultRunLoopMode]]

cacaodev pushed a commit to cacaodev/cappuccino that referenced this pull request Mar 10, 2021
…is selected by: 1/ redirect all events to token to tokenfield using hitTest: subclassing.(and handle token selection there) 2/ Remove the didblur function on the input element.

FIXES issue cappuccino#2894
@cacaodev
Copy link
Contributor

The fix referenced above treats the root of the problem which is that the field should not resign at all its fr when a token element is selected.
TODO: determine what the didBlur listener on the input element was supposed to do and if its removal creates any regression.

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 12, 2021

The fix referenced above treats the root of the problem which is that the field should not resign at all its fr when a token element is selected.
TODO: determine what the didBlur listener on the input element was supposed to do and if its removal creates any regression.

i think, that @aljungberg only fixed usability of the touch keyboard of the iPad with 26aab29, that is stopping it from reappearing all the time. I believe he did not test this fix with tokenfield. Therefore, i do not worry so much about the didBlur listener.

@cacaodev
Copy link
Contributor

I should have mentioned that in my patch I did remove the didBlur listener on the tokenfield input element, otherwise it sets again the fr on the tokenfield. But it may have another functionality that i did not figure yet by reading the code.

@daboe01
Copy link
Contributor Author

daboe01 commented Mar 24, 2022

-#needs-review
+#needs-improvement

@cappbot
Copy link

cappbot commented Mar 24, 2022

Milestone: Someday. Labels: #needs-improvement, AppKit, regression. What's next? The code for this issue has problems with formatting or fails a capp_lint check, has bugs, or has non-optimal logic or algorithms. It should be improved upon.

@daboe01
Copy link
Contributor Author

daboe01 commented Dec 21, 2023

@cacaodev i advocate for fixing such a fundamental app-breaking high-level issue asap. we can try a better fix in the future. any objections against merging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tokenfield selection and editing is broken
3 participants