Ticket #3522 (closed bug: wontfix)
A textarea cannot be made resizable in framesets
| Reported by: | qswitch | Owned by: | flesler |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3 |
| Component: | plugin | Version: | 1.2.6 |
| Keywords: | Cc: | qswitch, flesler | |
| Blocking: | Blocked by: |
Description
A textarea cannot be made resizable as expected when its page is part of a frameset and the jQuery-based JS code is run from within
a different page contained in the same frameset.
Any known way of addressing the textarea outside of the current page fails in so far as it leads to the same unexpected behavior.
Behavior observed in IE7: No reaction of the addressed textarea at all,not even cursor change.
Behavior observed in FF3.0.3, Opera 9.60, Safari 3.1.2: Cursor changes to "resizing" when mouse is over the actual textarea
(within its very page). Textarea will resize only if mouse is moved anywhere (!) within the page containing the JS code,
which in fact is the other page of the frameset. As it seems, jQuery does not handle addressing of frame objects correctly.
Most probably even other functions apart from resizable are affected.
frameset:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html
PUBLIC "-W3CDTD XHTML 1.0 FramesetEN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" />
</head> <frameset cols="290,*">
<frame name="leftFrame" src="frame_left.html" />
<frame name="rightFrame" src="frame_right.html" />
</frameset>
</html>
first frame (frame_left.html):
<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" " http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Script-Type" content="text/javascript"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Test</title> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript" src="ui.core.js"></script> <script type="text/javascript" src="ui.resizable.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#resizebleTextarea",parent.frames[1].document.body).resizable({handles: "all"}); }); </script> </head> <body> </body> </html>
second frame (frame_right.html):
<!DOCTYPE html
PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> </head> <body> <textarea id="resizebleTextarea"></textarea> </body> </html>
Attachments
Change History
comment:1 Changed 5 years ago by flesler
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 5 years ago by qswitch
- Status changed from closed to reopened
- Resolution invalid deleted
comment:3 Changed 5 years ago by flesler
- Cc qswitch, flesler added
- Priority changed from blocker to minor
- Component changed from unfilled to plugin
Why are you reopening it ?
comment:4 Changed 5 years ago by scott.gonzal
- Status changed from reopened to closed
- Resolution set to wontfix
jQuery is not guaranteed to work cross-window or cross-frame. Certain methods require the window or document that jQuery lives in to be the same as the window or document that the elements being modified live in. The best way to accomplish what you want is to move the code related to the second frame into the second frame.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Please repost this to the UI Bug Tracker.
I suggest you attach functional html files, instead of pasting the html code in here. That makes it easier for us to try it.