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

Document.$dom_caretRangeFromPoint does not work with other browsers #9227

Closed
DartBot opened this issue Mar 18, 2013 · 7 comments
Closed

Document.$dom_caretRangeFromPoint does not work with other browsers #9227

DartBot opened this issue Mar 18, 2013 · 7 comments
Assignees
Labels
web-libraries Issues impacting dart:html, etc., libraries
Milestone

Comments

@DartBot
Copy link

DartBot commented Mar 18, 2013

This issue was originally filed by da...@altern.org


I wish to find the range matching a specific pixel (typically where the user has clicked, but also for other purposes). Dart DOM API includes Document.$dom_caretRangeFromPoint(int x, int y) for this, but it does not work in Firefox.
The documentation suggests to use the Range constructor, but I did not see a constructor taking (int x, int y).
Is Dart going to implement caretRangeFromPoint for other browsers using an algorithm like the one suggested here:
http://stackoverflow.com/a/3208216/438970
?
Or should this be removed from the API ?

(I am using Dart SDK 0.4.1)

@kasperl
Copy link

kasperl commented Mar 19, 2013

Added Area-HTML, Triaged labels.

@blois
Copy link
Contributor

blois commented Mar 19, 2013

All of the $dom_ methods are slated for removal, but if this is critical functionality without a replacement we can look into polyfilling it on other platforms.


Added this to the M5 milestone.

@DartBot
Copy link
Author

DartBot commented Mar 28, 2013

This comment was originally written by da...@altern.org


OK, I was not aware of the impeding doom on the $dom methods. Should I file new bug reports if some of these methods are necessary for me ?

I don't think caretRangeFromPoint is the most important one. It is very important for my application because I am trying to create a new editor and it is hard to emulate this method in all browsers.

@efortuna
Copy link
Contributor

Yes, if there's not another way to do something that currently uses $dom_ file a bug. We think we have alternatives for everything but it's possible we've missed a few.

@blois
Copy link
Contributor

blois commented Jun 13, 2013

Set owner to @blois.
Added Accepted label.

@blois
Copy link
Contributor

blois commented Jun 13, 2013

http://code.google.com/p/dart/source/detail?r=24004

Added a .fromPoint constructor to Range.


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jun 14, 2013

This comment was originally written by da...@altern.org


Will it work in Firefox, IE and Safari ? If not, is there a way to check if it is supported by the browser ?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

4 participants