Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13049 closed bug (invalid)

bizarre $('style').text() behavior only on chrome, only with <style>, only after first call

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:


Create the following html page:

<!doctype html> <title></title> <meta charset="utf-8"> <body>


<style style="display:block" contenteditable> original style </style>

</div> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <button>modify</button> <script>


var t=$('style').text(); $('style').text(t+' modified');



if you modify the text and click on the button, the text is updated. if you modify it again, the old text and the new text appare together.

  • no problems in firefox and opera
  • no problems with other tags like for example <strong>

Change History (2)

comment:1 Changed 10 years ago by dmethvin

Owner: set to [email protected]
Status: newpending

We haven't ever supported cross-browser stylesheet creation via .text(), see #9832 for example. Is this a regression from previous versions of jQuery in Chrome?

Does it occur in plain DOM operations as well? Can you find a Chrome bug for it?

comment:2 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.