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

Fix #1124, #1125 #1276

Merged
merged 4 commits into from
Oct 5, 2020
Merged

Fix #1124, #1125 #1276

merged 4 commits into from
Oct 5, 2020

Conversation

sysint64
Copy link
Contributor

@sysint64 sysint64 commented Oct 3, 2020

PR fixes #1124 and #1125.

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! this stuff is definitely going to be in flux for the next little while but good to get this fixed.

@cmyr cmyr merged commit db64ac1 into linebender:master Oct 5, 2020
@sysint64 sysint64 deleted the issue-1124 branch October 5, 2020 16:10
@totsteps
Copy link
Collaborator

totsteps commented Oct 5, 2020

+ self.move_selection(Movement::StartOfDocument, data, false);

I don't think this is what we want. One needs to click twice in order to enter new text. This also results in some weird behavior(happens randomly), where the whole text is selected when the textbox receives focus by the first click(gif below).

The textbox should preserve the selection movement and only draw the selection if it is being focused. As seen in CLion, vscode, JavaFX, etc.

I am not sure what the best solution is, but again not resetting the selection does not resolve #1125. Maybe resetting hscroll_offset when FocusChanged solves this!

Screen Recording 2020-10-05 at 18 34 19

@cmyr
Copy link
Member

cmyr commented Oct 5, 2020

so I think the desired behaviour is platform dependant.

  • On all platforms, if a widget does not have focus it should not draw its selection.
  • on mac, when a textbox gains focus, it should select all text.
  • in windows, a textbox should preserve its previous selection state.

additionally:

  • on mac, a textbox should not draw the cursor if the selection is not a caret.

I think it's best to do this work on top of #1274.

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

Successfully merging this pull request may close these issues.

Able to select text in multiple TextBoxes at once
3 participants