Side navigation
#7284 closed bug (invalid)
Opened October 22, 2010 08:37AM UTC
Closed October 24, 2010 08:12PM UTC
.val() returns object instead of value if TinyMCE active
Reported by: | trurl-master@yandex.com | Owned by: | trurl-master@yandex.com |
---|---|---|---|
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>
Attachments (0)
Change History (10)
Changed October 22, 2010 05:48PM UTC by comment:1
component: | unfiled → attributes |
---|
Changed October 22, 2010 05:55PM UTC by comment:2
priority: | undecided → low |
---|
Changed October 22, 2010 08:18PM UTC by comment:3
Replying to [comment:1 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.
Changed October 23, 2010 08:07AM UTC by comment:4
owner: | → trurl-master@yandex.com |
---|---|
status: | new → pending |
Please provide a live test case.
Changed October 23, 2010 10:00AM UTC by comment:5
status: | pending → new |
---|
Changed October 23, 2010 03:05PM UTC by comment:6
This is the output I'm getting from your test case (copied locally, unmodified)
Changed October 23, 2010 03:36PM UTC by comment:7
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).
Changed October 23, 2010 09:23PM UTC by comment:8
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
Changed October 24, 2010 07:52AM UTC by comment:9
status: | pending → new |
---|
Can close one, latest tinymce don't have this issue.
Changed October 24, 2010 08:12PM UTC by comment:10
resolution: | → invalid |
---|---|
status: | new → closed |
Need verification that this is jQuery's problem and not TinyMCE