← Back to team overview

touch-packages team mailing list archive

[Bug 1457468] Re: Text selection is partially broken when textarea is partially out of view

 

My proposal is:
We need a way to make sure that the dragging cursor is always *on screen*.
What we can do is:
1) scroll the inner textarea flickable;
2) while (!cursorIsOnScreen) { go up in the hierarchy and look for another flickable and scroll that as much as possible to try bring the cursor into the view.  } There may be N flickables along the way, in that case we'll potentially scroll N flickables, if only scrolling some isn't enough.

HOWEVER:
This is just a solution. For instance, it doesn't take into account the cases where:
- The app developer uses something else than a flickable, like a custom scrolling component
- The app developer creates a form page which doesn't have any scrollable behaviour which would account for devices where content of the form doesn't fit in the view. In that case, I think it's app dev's fault as he hasn't designed the app properly. But we may think about a way to help them...


** Description changed:

  Description:
  
  In some cases, text selection doesn't work properly, in particular it's
  not possible to drag the selection handles all the way to the bottom (or
  the top) if the top (or bottom) of the TextArea is outside of the view.
+ 
+ This bug is partially overlapping with
+ https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1200371
+ but they're not the same thing.
  
  I have been thinking for a few minutes about what those cases are, and I
  came up with the following list:
  
  - If the TextArea is taller than the view, then one part of it will be
  out of screen for sure. Let's suppose it's the top side. In that case,
  the user wouldn't be able, starting the drag from *within* the view, to
  reach the text which is *outside* of the view. This happens, for
  instance, in any app which includes a text editor. Once the text fills
  more than one page, the user won't be able to select text starting from
  anywhere inside the current view, and ending anything outside of the
  view. This is probably a very common usecase, together with the second
  one.
  
  - If the TextArea is inside a Flickable and that Flickable is scrolled
  in a way that partially hides the TextArea. This happens whenever an app
  has, for instance, a listview which holds many field of some kind of
  forms the user has to fill in. The user fills the visible fields, then
  scroll down, thus potentially partially hiding (or partially bringing
  into the view) on of the fields.
  
  - If the TextArea is inside a Flickable, which is inside other
  Flickables, and they're scrolled in a way that the TextArea is only
  partilly into the view. This is the generic case (even though probably
  not the most common one).
  
  I'll write my solution proposal in a comment.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1457468

Title:
  Text selection is partially broken when textarea is partially out of
  view

Status in ubuntu-ui-toolkit package in Ubuntu:
  New

Bug description:
  Description:

  In some cases, text selection doesn't work properly, in particular
  it's not possible to drag the selection handles all the way to the
  bottom (or the top) if the top (or bottom) of the TextArea is outside
  of the view.

  This bug is partially overlapping with
  https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-
  toolkit/+bug/1200371 but they're not the same thing.

  I have been thinking for a few minutes about what those cases are, and
  I came up with the following list:

  - If the TextArea is taller than the view, then one part of it will be
  out of screen for sure. Let's suppose it's the top side. In that case,
  the user wouldn't be able, starting the drag from *within* the view,
  to reach the text which is *outside* of the view. This happens, for
  instance, in any app which includes a text editor. Once the text fills
  more than one page, the user won't be able to select text starting
  from anywhere inside the current view, and ending anything outside of
  the view. This is probably a very common usecase, together with the
  second one.

  - If the TextArea is inside a Flickable and that Flickable is scrolled
  in a way that partially hides the TextArea. This happens whenever an
  app has, for instance, a listview which holds many field of some kind
  of forms the user has to fill in. The user fills the visible fields,
  then scroll down, thus potentially partially hiding (or partially
  bringing into the view) on of the fields.

  - If the TextArea is inside a Flickable, which is inside other
  Flickables, and they're scrolled in a way that the TextArea is only
  partilly into the view. This is the generic case (even though probably
  not the most common one).

  I'll write my solution proposal in a comment.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1457468/+subscriptions


References