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 9199997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:40:02+00:00 2026-06-17T22:40:02+00:00

I have a radio button inside a content editable div. But when I click

  • 0

I have a radio button inside a content editable div. But when I click on the radio button nothing happens in Firefox and IE. But it works fine in Chrome.

What can I do to make this work in Firefox and IE?

The code is available at http://jsbin.com/uqexoy/2/edit and is simply:

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div contentEditable="true"><input type="radio" />ere er er er re </div>
</body>
</html>
  • 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-17T22:40:04+00:00Added an answer on June 17, 2026 at 10:40 pm

    This was tested to work in IE8, IE9, Chrome and Firefox. It does work, albeit rather strangely so, also in Opera, where the input field (in our case a radio button) does change it’s status to checked (tested with JavaScript alert(this.checked);), however it doesn’t change it’s appearance to reflect that. See for a possible workaround below.

    The solution for the majority of the problematic browsers is to wrap non-editable contents in a span, like so:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset=utf-8 />
    <title>JS Bin</title>
    </head>
    <body>
      <div contentEditable="true">
        <span contentEditable="false">
          <input type="radio" />
        </span>ere er er er re 
      </div>
    </body>
    </html>
    

    As for the Opera part, the fact that it doesn’t reflect changes to the radio button‘s selected state ‘should’ be possible to override by styling its two different states with CSS selectors input[type="radio"] and input[type="radio"]:checked and applying these two CSS rules only to Opera browsers. Opera seems to accept background-color property changes for such radio buttons, which doesn’t make any difference in all other browsers I’ve tested in. This might be your way to apply Opera specific CSS rule to reflect changes to the checked state. Here’s an example:

    input[type="radio"]:checked {background-color:gray;}
    

    Other browsers will simply ignore this CSS rule. Another acceptable Opera specific rule that can be applied is border, but I find that of limited to no value in our case.

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

Sidebar

Related Questions

hi I have a radio button list inside a repeater , the repeater is
I have a HTML radio button inside a repeater. I'm facing two problems: When
I have designed a gridview with a radio button inside the itemtemplet. I also
I have one radio button list and one drop down list inside the modal
I have a radio button inside a repeater as follow. <asp:Repeater ID="rpt" runat="server"> <ItemTemplate>
I need some help. I have a div inside which there are some radio
I have a radio button list and some of the labels are quite long
I have 2 radio button with values New & Existing. If user chooses New,
I have a radio button control adaptor that attempts to render the radio button
I have a radio button that is the first column of many rows in

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.