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

Bug/Regression on Mac: pressing mouse on selected text and moving mouse within it unselects selection rather than displacing caret #603

Open
JordanMartinez opened this issue Oct 1, 2017 · 0 comments
Labels
bug OS-Mac Issues specific to the Mac platform test
Milestone

Comments

@JordanMartinez
Copy link
Contributor

In other words, this test fails on Mac but not on Linux:

public class Test extends InlineCssTextAreaAppTest {

private String firstWord = "Some";
private String firstParagraph = firstWord + " text goes here";
private String extraText = "This is extra text";

@Test
public void pressing_mouse_on_selection_and_dragging_and_releasing_moves_selected_text_to_that_position() {
    // setup
    String twoSpaces = "  ";
    interact(() -> {
        area.replaceText(firstParagraph + "\n" + twoSpaces + extraText);
        area.selectRange(0, firstWord.length());
    });

    String selText = area.getSelectedText();

    Bounds letterInFirstWord = area.getCharacterBoundsOnScreen(1, 2).get();

    int insertionPosition = firstParagraph.length() + 2;
    Bounds insertionBounds = area.getCharacterBoundsOnScreen(insertionPosition, insertionPosition + 1).get();

    moveTo(letterInFirstWord)
            .press(PRIMARY)
            .dropTo(insertionBounds);

    String expectedText = firstParagraph.substring(firstWord.length())
        + "\n" + " " + firstWord + " " + extraText;

    assertEquals(insertionPosition, area.getCaretPosition());

    // Mac build fails here
    assertEquals(selText, area.getSelectedText());

    assertEquals(expectedText, area.getText());
}

}
@JordanMartinez JordanMartinez changed the title Bug/Regression: pressing mouse on selected text and moving mouse within it unselects selection rather than displacing caret Bug/Regression on Mac: pressing mouse on selected text and moving mouse within it unselects selection rather than displacing caret Oct 2, 2017
@JordanMartinez JordanMartinez added this to the 0.7-M8 milestone Oct 4, 2017
@JordanMartinez JordanMartinez added the OS-Mac Issues specific to the Mac platform label Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug OS-Mac Issues specific to the Mac platform test
Projects
None yet
Development

No branches or pull requests

1 participant