Skip to main content

Bug Tracker

Side navigation

#13049 closed bug (invalid)

Opened December 13, 2012 03:30PM UTC

Closed December 28, 2012 09:05AM UTC

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

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

Create the following html page:

<!doctype html>


<meta charset="utf-8">



<style style="display:block" contenteditable>

original style



<script src=""></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>
Attachments (0)
Change History (2)

Changed December 13, 2012 04:27PM UTC by dmethvin comment:1

owner: →
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?

Changed December 28, 2012 09:05AM UTC by trac-o-bot comment:2

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!