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

support scrollTop as an Attribute of Element [patch] #605

Closed
DartBot opened this issue Nov 26, 2011 · 14 comments
Closed

support scrollTop as an Attribute of Element [patch] #605

DartBot opened this issue Nov 26, 2011 · 14 comments
Labels
closed-obsolete Closed as the reported issue is no longer relevant web-libraries Issues impacting dart:html, etc., libraries

Comments

@DartBot
Copy link

DartBot commented Nov 26, 2011

This issue was originally filed by jeffbailey@google.com


What steps will reproduce the problem?

  1. textWindow.scrollTop = textWindow.scrollHeight;

only knows about scrollHeight, not scrollTop and issues a warning
at compile time.

This appears to be the canonical way to cause a window to be scrolled all the way to the bottom.

What version of the product are you using? On what operating system?

Path: .
URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/html
Repository Root: http://dart.googlecode.com/svn
Repository UUID: 260f80e4-7a28-3924-810f-c04153c831b5
Revision: 1856
Node Kind: directory
Schedule: normal
Last Changed Author: jacobr@google.com
Last Changed Rev: 1771
Last Changed Date: 2011-11-22 17:12:10 -0800 (Tue, 22 Nov 2011)

Please provide any additional information below.

@DartBot
Copy link
Author

DartBot commented Nov 26, 2011

This comment was originally written by jeffbailey@google.com


Index: client/html/src/Element.dart
===================================================================

--- client/html/src/Element.dart (revision 1856)
+++ client/html/src/Element.dart (working copy)
@@ -141,6 +142,10 @­@
 
   void set scrollTop(int value);
 

  • int get scrollWidth();
  • int get scrollHeight();

   bool get spellcheck();
 
   void set spellcheck(bool value);
Index: client/html/src/ElementWrappingImplementation.dart
===================================================================

--- client/html/src/ElementWrappingImplementation.dart (revision 1856)
+++ client/html/src/ElementWrappingImplementation.dart (working copy)
@@ -721,6 +734,10 @­@
  
   void set scrollTop(int value) { _ptr.scrollTop = value; }
 

  • int get scrollWidth() { return _ptr.scrollWidth; }
  • int get scrollHeight() { return _ptr.scrollHeight; }

   /** @­domName getClientRects */
   Future<ElementRect> get rect() {
     return _createMeasurementFuture(

Index: client/html/src/DocumentFragmentWrappingImplementation.dart
===================================================================

--- client/html/src/DocumentFragmentWrappingImplementation.dart (revision 1856)
+++ client/html/src/DocumentFragmentWrappingImplementation.dart (working copy)
@@ -349,6 +358,18 @­@
       "Document fragments don't support scrolling.");
   }
 

  • int get scrollWidth() {
  • throw new UnsupportedOperationException(
  •  "Document fragments don't support scrolling.");
    
  • }
  • int get scrollHeight() {
  • throw new UnsupportedOperationException(
  •  "Document fragments don't support scrolling.");
    
  • }

   void set spellcheck(bool value) {
      throw new UnsupportedOperationException(
       "Spellcheck can't be set for document fragments.");


Changed the title to: "support scrollTop as an Attribute of Element [patch]".

@DartBot
Copy link
Author

DartBot commented Nov 28, 2011

This comment was originally written by drfibonacci@google.com


Added Area-UI, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Dec 8, 2011

This comment was originally written by jeffbailey@google.com


Assigning per Jacob's request.


Set owner to @jacob314.

@DartBot
Copy link
Author

DartBot commented Dec 12, 2011

This comment was originally written by jeffbailey@google.com

@DartBot
Copy link
Author

DartBot commented Jan 20, 2012

This comment was originally written by zundel@google.com


I'm wondering why in the html library we only have setters for scrollTop and scrollLeft and not getters as well. I think its supposed to be a read/write property on the DOM.

http://api.dartlang.org/html/Element.html#set:scrollTop
http://api.dartlang.org/html/Element.html#set:scrollLeft

@DartBot
Copy link
Author

DartBot commented Jan 20, 2012

This comment was originally written by zundel@google.com


(I found Element.rect() and see it returns a Future so maybe its because reading this property forces a layout)

@DartBot
Copy link
Author

DartBot commented Jan 20, 2012

This comment was originally written by jeffbailey@google.com


My understanding is that yes, that's why it's attached to a Future.

My argument when I met the developers in person is that this is the Wrong Thing because it doesn't let me, the developer, decide when I'm willing to take that performance penalty in exchange for not having to use a callback in the middle of some code.

@vsmenon
Copy link
Member

vsmenon commented Apr 12, 2012

Removed Area-UI label.
Added Area-DOM label.

@vsmenon
Copy link
Member

vsmenon commented Jun 22, 2012

cc @jacob314.
Set owner to @vsmenon.
Added this to the M1 milestone.

@iposva-google
Copy link
Contributor

Removed Area-DOM label.
Added Area-HTML label.

@vsmenon
Copy link
Member

vsmenon commented Aug 17, 2012

Removed the owner.

@vsmenon
Copy link
Member

vsmenon commented Sep 5, 2012

Removed this from the M1 milestone.
Added this to the M2 milestone.

@blois
Copy link
Contributor

blois commented Oct 15, 2012

Removed this from the M2 milestone.
Added this to the Later milestone.

@DartBot
Copy link
Author

DartBot commented Nov 5, 2013

This comment was originally written by amouravski@google.com


This appears to be fixed.


Added AssumedStale label.

@DartBot DartBot added Type-Defect web-libraries Issues impacting dart:html, etc., libraries closed-obsolete Closed as the reported issue is no longer relevant labels Nov 5, 2013
@DartBot DartBot added this to the Later milestone Nov 5, 2013
copybara-service bot pushed a commit that referenced this issue Jan 31, 2023
…g, mockito, package_config, shelf, string_scanner, test, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/f700e9a..f700e9a):
  f700e9a  2023-01-27  Devon Carew  blast_repo fixes (#231)

characters (https://github.com/dart-lang/characters/compare/4526aa8..4526aa8):
  4526aa8  2023-01-30  Lasse R.H. Nielsen  Update tables to Unicode 15.0. (#71)

collection (https://github.com/dart-lang/collection/compare/a566328..a566328):
  a566328  2023-01-26  Devon Carew  add a publish script; prep to publish (#267)

dartdoc (https://github.com/dart-lang/dartdoc/compare/bc7bdc4..bc7bdc4):
  bc7bdc44  2023-01-30  dependabot[bot]  Bump js from 0.6.5 to 0.6.7 (#3310)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/e73c4ad..e73c4ad):
  e73c4ad  2023-01-26  Devon Carew  blast_repo fixes (#89)

logging (https://github.com/dart-lang/logging/compare/399100a..399100a):
  399100a  2023-01-26  Devon Carew  add a publish script; prep to publish 1.1.1 (#128)

mockito (https://github.com/dart-lang/mockito/compare/d2a8df1..d2a8df1):
  d2a8df1  2023-01-30  Kevin Moore  Latest build_web_compilers, move to pkg:lints, fix breaks (#605)
  13340b5  2023-01-30  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#600)

package_config (https://github.com/dart-lang/package_config/compare/3fe81c4..3fe81c4):
  3fe81c4  2023-01-30  Kevin Moore  Support latest pkg:build_web_compilers, lints. Update min SDK (#129)

shelf (https://github.com/dart-lang/shelf/compare/8fca9d9..8fca9d9):
  8fca9d9  2023-01-26  Devon Carew  blast_repo fixes (#326)

string_scanner (https://github.com/dart-lang/string_scanner/compare/29e471e..29e471e):
  29e471e  2023-01-30  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#53)

test (https://github.com/dart-lang/test/compare/cec47c1..cec47c1):
  cec47c1c  2023-01-27  Nate Bosch  Add missing pub requirements (#1878)
  c99d455e  2023-01-27  Nate Bosch  Prepare to publish (#1877)
  0e7ec6a7  2023-01-27  Nate Bosch  Rename `Check` to `Subject` (#1875)
  78382731  2023-01-27  Nate Bosch  Add String.matches condition (#1874)
  26e0e87b  2023-01-27  Nate Bosch  Add Iterable.containsInOrder condition (#1873)
  c9232d6b  2023-01-27  Nate Bosch  Rename `that` to `which` (#1872)
  457166b3  2023-01-26  Nate Bosch  Add missing dependency on package:lints (#1876)
  193f2a0b  2023-01-26  Nate Bosch  Retry instead of extend timeout for flaky Node tests (#1871)
  7ad9b2c3  2023-01-26  Nate Bosch  Overhaul async matchers (#1868)
  ca254546  2023-01-26  Nate Bosch  Add a withQueue utility (#1870)
  6ae2e5e9  2023-01-26  Nate Bosch  Refactor tests to a new isRejectedBy utility (#1867)
  5aeba66d  2023-01-26  Nate Bosch  Use pubspec_overrides.yaml files (#1869)

webdev (https://github.com/dart-lang/webdev/compare/ce9c581..ce9c581):
  ce9c581  2023-01-29  Anna Gringauze  Validate only needed summaries in expression_compiler_service (#1920)

Change-Id: I3ddb0ddeb3b989f6f9e78cd8aa6327aba5899018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280078
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

4 participants