Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: wtk
    • Labels:
      None

      Description

      If you start to select text in a TextArea and while selecting, move the cursor over the bounds of the TextArea (north of it), the selection area is not expanded.

      This bug only appears to affect TextArea when the content has been scrolled as far down or as far up as possible. While the text is being vertically scrolled, selection works as expected.

      A video showing the problem can be seen here: https://edvin.viewscreencasts.com/c97422da51ed4cf1845e5a7610a8716f

      This bug makes it hard to select text in a TextArea, because one often moves the cursor further north than the TextArea when selecting.

        Activity

        Hide
        Edvin Syse added a comment -

        Path to correct the selection behavior of TextArea. The check I removed might have been for something else, but I can't see what. I basically changed:

        if (y >= visibleArea.y
        && y < visibleArea.y + visibleArea.height) {
        // Stop the scroll selection timer

        to

        if (y < visibleArea.y + visibleArea.height) {
        // Stop the scroll selection timer

        in TextAreaSkin#mouseMove() so that it is no longer required that the mouse is above visibleArea.y.

        Show
        Edvin Syse added a comment - Path to correct the selection behavior of TextArea. The check I removed might have been for something else, but I can't see what. I basically changed: if (y >= visibleArea.y && y < visibleArea.y + visibleArea.height) { // Stop the scroll selection timer to if (y < visibleArea.y + visibleArea.height) { // Stop the scroll selection timer in TextAreaSkin#mouseMove() so that it is no longer required that the mouse is above visibleArea.y.
        Hide
        Greg Brown added a comment -

        I think that patch may prevent the scroll timer from being cancelled.

        Show
        Greg Brown added a comment - I think that patch may prevent the scroll timer from being cancelled.
        Hide
        Edvin Syse added a comment -

        You might be correct It seems to be stopped on mouseUp though. I haven't fully understood the function of this timer, I'm not very familiar with this skin yet.

        Show
        Edvin Syse added a comment - You might be correct It seems to be stopped on mouseUp though. I haven't fully understood the function of this timer, I'm not very familiar with this skin yet.
        Hide
        Edvin Syse added a comment -

        That could be remedied by doing:

        if (y >= visibleArea.y || y < visibleArea.y + visibleArea.height)

        But again, I'm unsure of the side effects.

        Show
        Edvin Syse added a comment - That could be remedied by doing: if (y >= visibleArea.y || y < visibleArea.y + visibleArea.height) But again, I'm unsure of the side effects.
        Hide
        Edvin Syse added a comment -

        Yeah, that would stop the scrolling from occuring when you select and move north. I'm out

        Show
        Edvin Syse added a comment - Yeah, that would stop the scrolling from occuring when you select and move north. I'm out
        Hide
        Greg Brown added a comment -

        I was going to add a comment to that effect, but then thought I might be mis-reading it. But I guess not.

        The "right" fix probably lies somewhere else - the skin should still be able to respond to the mouse move outside the component's bounds even when the scroll timer isn't running.

        Show
        Greg Brown added a comment - I was going to add a comment to that effect, but then thought I might be mis-reading it. But I guess not. The "right" fix probably lies somewhere else - the skin should still be able to respond to the mouse move outside the component's bounds even when the scroll timer isn't running.
        Hide
        Edvin Syse added a comment -

        That might be difficult if the mouse is outside of the Pivot Window's bounds I think. Then you'd need the timer to track the mouse movements, because there won't be any mouse events fired, right?

        Show
        Edvin Syse added a comment - That might be difficult if the mouse is outside of the Pivot Window's bounds I think. Then you'd need the timer to track the mouse movements, because there won't be any mouse events fired, right?
        Hide
        Greg Brown added a comment -

        During a "drag" operation (left mouse button down/mouse move), mouse events continue to be fired to the component that "captured" the mouse. That's how we get notified when the mouse moves outside the text area's bounds.

        Show
        Greg Brown added a comment - During a "drag" operation (left mouse button down/mouse move), mouse events continue to be fired to the component that "captured" the mouse. That's how we get notified when the mouse moves outside the text area's bounds.
        Hide
        Edvin Syse added a comment -

        I understand. When you said the right fix probably lies elsewhere.. did you have something spesific in mind? I'd like to investigate further, but I still don't have a good enough overview of Pivot internals.

        Show
        Edvin Syse added a comment - I understand. When you said the right fix probably lies elsewhere.. did you have something spesific in mind? I'd like to investigate further, but I still don't have a good enough overview of Pivot internals.
        Hide
        Greg Brown added a comment -

        I just meant elsewhere in the mouse handling code of TextAreaSkin.

        Show
        Greg Brown added a comment - I just meant elsewhere in the mouse handling code of TextAreaSkin.
        Hide
        Noel Grandin added a comment -

        Fixed in rev 1153480

        Show
        Noel Grandin added a comment - Fixed in rev 1153480
        Hide
        Edvin Syse added a comment -

        Noel, I think rev 1153480 stops the scroll timer prematurely. If you scroll down and then try to select text "upwards", the textarea doesn't scroll back up now.

        Show
        Edvin Syse added a comment - Noel, I think rev 1153480 stops the scroll timer prematurely. If you scroll down and then try to select text "upwards", the textarea doesn't scroll back up now.

          People

          • Assignee:
            Noel Grandin
            Reporter:
            Edvin Syse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development