Skip to content

bug in HTMLTextAreaElementImpl # setSelectionRange? vm? #3364

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. set up on.keyPress handler for a text area ("consoleElem").
  2. in event handler, call consoleElem.setSelectionRange(consoleElem.textLength, consoleElem.textLength);

What is the expected output? What do you see instead?

The idea is that regardless of where the user moved a cursor in a text area, the caret is placed at the end.
This was working fine in my previous Dartium.

Now, I get a stacktrace on key press:

Exception: String expected
Stack Trace: 0. Function: '_HTMLTextAreaElementImpl@33cc944a._setSelectionRange@33cc944a' url: '/Volumes/data/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/HTMLTextAreaElementImplementation.dart' line:6 col:1
 1. Function: '[email protected]' url: '/Volumes/data/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/HTMLTextAreaElementImplementation.dart' line:5 col:85
 2. Function: 'Console.handleKeyPress' url: 'http://127.0.0.1:3030/Users/bqe/dart/MyLogo/Console.dart' line:85 col:36
 3. Function: '[email protected]' url: '/Volumes/data/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/EventTargetImplementation.dart' line:16 col:84

Exception: String expected
Stack Trace: 0. Function: '_HTMLTextAreaElementImpl@33cc944a._setSelectionRange@33cc944a' url: '/Volumes/data/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/HTMLTextAreaElementImplementation.dart' line:6 col:1
 1. Function: '[email protected]' url: '/Volumes/data/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/HTMLTextAreaElementImplementation.dart' line:5 col:85
 2. Function: 'Console.handleKeyPress' url: 'http://127.0.0.1:3030/Users/bqe/dart/MyLogo/Console.dart' line:85 col:36
 3. Function: '[email protected]' url: '/Volumes/data/b/build/slave/dartium-mac-inc/build/src/xcodebuild/DerivedSources/Release/webkit/bindings/dart/dart/EventTargetImplementation.dart' line:16 col:84

In Dartium, enter chrome://version and paste the results here.

Chromium 21.0.1160.0 (Developer Build 139982)
OS Mac OS X
WebKit 537.1 (Source/WebCore/Configurations@568)
JavaScript V8 3.11.8
DartVM r8224
Flash 11.2.202.235
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1160.0 (Dart) Safari/537.1
Command Line /Users/bqe/Downloads/dart/dart-sdk/Chromium.app/Contents/MacOS/Chromium --remote-debugging-port=9322 --user-data-dir=/Users/bqe/.dartChromeSettings --bwsi --no-first-run --no-default-browser-check --no-process-singleton-dialog --flag-switches-begin --flag-switches-end about:blank
Executable Path /Users/bqe/Downloads/dart/dart-sdk/Chromium.app/Contents/MacOS/Chromium
Profile Path /Users/bqe/.dartChromeSettings/Default

Put OS and machine details here.
(If you're using Linux or Mac OS, you can get this from uname -a.)

$ uname -a
Darwin bqe-macbookpro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-duplicateClosed in favor of an existing report

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions