Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7734225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:11:49+00:00 2026-06-01T07:11:49+00:00

I have an editable iframe with some textnodes. During editing i want (on some

  • 0

I have an editable iframe with some textnodes. During editing i want (on some condition) set the cursor to the start of a text node. In FireFox this works fine using the following code. In Chrome instead the cursor is set to the end of the previous sibling (also text node). I am using this code:

/* get selection */
var selection = this.iframewin.getSelection();

/* create new range */
var newrange = this.iframedoc.createRange();
newrange.setStart(textnode, 0);
newrange.setEnd(textnode, 0);

/* set new range */
selection.removeAllRanges();
selection.addRange(newrange);

As far as i know both FireFox and Chrome do fully comply with the DOM Range spec. So shouldn’t they handle this code equally? Or am i doing something else wrong? If you need any further information please ask.

Edit:
Just after posting i found the bug report that describes this for Chrome:

https://bugs.webkit.org/show_bug.cgi?id=23189

So i think Chrome users have to deal with that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:11:51+00:00Added an answer on June 1, 2026 at 7:11 am

    Just after posting i found the bug report that describes this for Chrome:

    https://bugs.webkit.org/show_bug.cgi?id=23189

    So i think Chrome users have to deal with that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On the webpage I have iframe, in which I display some content. I want
I have a document (inside editable iframe), I need to retrieve a closest node
I want to get the cursor position of an editable iFrame (using designMode). Here
I have an editable iframe and I would like to insert text at the
I have an editable JComboBox where I want to take some action whenever the
I have an editable DataGridView with SelectionMode set to FullRowSelect (so the whole row
I have a Tix.ComboBox with an editable text field. How do I force the
I have 4 editable uitextviews, user can set its font font color etc. Now
I am trying to do a simple task: I have an editable text field,
I am building a small cms system in MVC.NET, and I have some editable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.