Q7

double-click-text does not work well with multi-line Text widgets

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.19
  • Fix Version/s: 1.2.21
  • Component/s: Runtime
  • Labels:
    None
  • Test Mode:
    Manual

Activity

Hide
komaz added a comment - 14/Jun/13 12:15 PM

The issue is that in multiline textboxes (not in Styled text) sometimes position is determined wrong.

Since textboxes map to native controls, the expected user behavior by double click (word selection) happens on OS level, so in fact we just emulate double-clicks – determine an offset in a textbox based on passed line/column and setting a word selection around calculated offset.

On Windows sometimes a wrong word is selected. Most likely this happens because in this case Q7 does not take line ending into account. This version can be easily proved or disapproved – if 'inaccuracy delta' increases with a line number, then the reason is in line endings

Show
komaz added a comment - 14/Jun/13 12:15 PM The issue is that in multiline textboxes (not in Styled text) sometimes position is determined wrong. Since textboxes map to native controls, the expected user behavior by double click (word selection) happens on OS level, so in fact we just emulate double-clicks – determine an offset in a textbox based on passed line/column and setting a word selection around calculated offset. On Windows sometimes a wrong word is selected. Most likely this happens because in this case Q7 does not take line ending into account. This version can be easily proved or disapproved – if 'inaccuracy delta' increases with a line number, then the reason is in line endings
Hide
komaz added a comment - 14/Jun/13 12:22 PM

Reproduced.

  1. Use a multiline textbox like Description view in Q7 Test case editor (if AUT is Q7) or Arguments section in External Tools launch configuration dialog (if using Eclipse SDK).
  2. Set a text to this:
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    
  3. A snippet get-editbox | double-click-text "2:10" correctly selects a third 'aaa' on 2nd row. However changing a line to 5 selects a 2nd 'aaa' and changing line to 7 selects the first, i.e. delta increases with line number
Show
komaz added a comment - 14/Jun/13 12:22 PM Reproduced.
  1. Use a multiline textbox like Description view in Q7 Test case editor (if AUT is Q7) or Arguments section in External Tools launch configuration dialog (if using Eclipse SDK).
  2. Set a text to this:
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    aaa aaa aaa aaa
    
  3. A snippet get-editbox | double-click-text "2:10" correctly selects a third 'aaa' on 2nd row. However changing a line to 5 selects a 2nd 'aaa' and changing line to 7 selects the first, i.e. delta increases with line number
Hide
alexander.sheboltaev added a comment - 17/Jun/13 11:09 AM

is there any chance that line-ending chars will be different from platform default? (i.e. will be \n in windows, or \r\n on mac)

Show
alexander.sheboltaev added a comment - 17/Jun/13 11:09 AM is there any chance that line-ending chars will be different from platform default? (i.e. will be \n in windows, or \r\n on mac)
Hide
alexander.sheboltaev added a comment - 17/Jun/13 11:47 AM

click-text too
should be fixed also for recording

Show
alexander.sheboltaev added a comment - 17/Jun/13 11:47 AM click-text too should be fixed also for recording

People

  • Assignee:
    alexander.sheboltaev
    Reporter:
    sergey
Vote (0)
Watch (0)

Dates

  • Created:
    24/May/13 5:41 PM
    Updated:
    17/Jun/13 4:46 PM
    Resolved:
    17/Jun/13 4:46 PM