Opened 13 years ago
Closed 13 years ago
#7284 closed bug (invalid)
.val() returns object instead of value if TinyMCE active
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | attributes | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
test case:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript" src="path/to/tinymce/jquery.tinymce.js"></script> <form> <div> <input type="text" name="a" value="a_value" /> <textarea name="b">b_value</textarea> <input id="send" type="submit" value="send" /> </div> </form> <div id="out"></div> <script type="text/javascript"> $(document).ready(function() { $('textarea').tinymce({ script_url : 'path/to/tinymce/tiny_mce.js' }); $('#send').click( function() { $(':input:not(:submit)').each( function() { //$('#out').append( '<br />' + this.name + ' -> ' + $(this).val() ); console.log( $(this).val() ); }); return false; }); }); </script>
Change History (10)
comment:1 follow-up: 3 Changed 13 years ago by
Component: | unfiled → attributes |
---|
comment:2 Changed 13 years ago by
Priority: | undecided → low |
---|
comment:3 Changed 13 years ago by
Replying to rwaldron:
Need verification that this is jQuery's problem and not TinyMCE
Not sure how i can do this. It works fine with 1.4.2. Maybe this more accurate test case will prove it(sorry it's not in jsFiddle, they do not have tinymce):
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript" src="path/to/tinymce/jquery.tinymce.js"></script> <input id="test" type="text" name="a" value="a_value" /> <form> <div> <textarea name="b">b_value</textarea> </div> </form> <button id="send">send</button> <div id="out"></div> <script type="text/javascript"> $(document).ready(function() { $('textarea').tinymce({ script_url : 'path/to/tinymce/tiny_mce.js' }); $('#send').click( function() { console.log( $('#test').val() ); return false; }); }); </script>
It returns $('#test') object instead of value. Same in Firefox, Opera and Chrome, IE not tested.
comment:4 Changed 13 years ago by
Owner: | set to trurl-master@… |
---|---|
Status: | new → pending |
Please provide a live test case.
comment:5 Changed 13 years ago by
Status: | pending → new |
---|
comment:6 Changed 13 years ago by
This is the output I'm getting from your test case (copied locally, unmodified)
comment:7 Changed 13 years ago by
Thats how my test case looks: http://dl.dropbox.com/u/413967/7428_testcase/out.png
Checked on Ubuntu(firefox, opera, chrome) and Win7(chrome).
comment:8 Changed 13 years ago by
Status: | new → pending |
---|
This should probably be narrowed down without the third party library. No one has time to go through the TinyMCE code to see what's going on. Can you provide an html structure that causes jQuery to fail on val
? Perhaps inspect the DOM and try to recreate the issue by hand.
Thanks
comment:9 Changed 13 years ago by
Status: | pending → new |
---|
Can close one, latest tinymce don't have this issue.
comment:10 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Need verification that this is jQuery's problem and not TinyMCE