Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11633 closed bug (invalid)

IE 8 throws internal error on presenting disabled textarea in fancybox

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: None
Component: misc Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:



at first - sorry for not providing a testcase appropriatly. I really tried hard to add my issue to jsfiddle. But this is really user-un-friendly (complicated). But anyway.

On link click I want to show a (fancybox) window with a textarea. Because the current (business) mode is read-only the textarea is disabled. If i click the link in IE 8 i get the following error window:

There was an error while executing script Line: 3175 Character: 6 Error: Unknown Runtime error Code: 0 URL: file://...../jquery-1.7.1.min.js

My source code looks like this:

<!DOCTYPE html> <html>


<meta charset='utf-8'/> <title>POC - On demand textarea</title> <script src="ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script type='text/javascript' src='fancybox/source/jquery.fancybox.pack.js?v=2.0.5' language='JavaScript'></script> <link media='screen' rel='stylesheet' href='fancybox/source/jquery.fancybox.css?v=2.0.5' type='text/css'>

</head> <body>


<a id='activator' title='Click' href='#editor'>Click me</a>

</div> <form id='editorForm' action=>

<div id='editor'>

<textarea id='theText' rows='10' cols='10' disabled=>sadasdg</textarea>

</div> <input name='theValue' type='HIDDEN' value='sadasdg'> <script type='text/javascript' language='JavaScript'>

<!-- $(document).ready (function () {

$("#editor").hide(); $("#activator").fancybox({

autoSize : false, height : 300, width : 400, type : 'inline', title : "Ihre Bemerkungen", beforeLoad : function () {

var dbText = $("form.#editorForm > input[name='theValue']").val(); $("#theText").val(dbText); $("#editor").show();

}, afterShow : function () {


}, afterClose : function () {

var editorText = $("#theText").val(); $("form.#editorForm > input[name='theValue']").val(editorText);



}); -->





I know this is realy ugly but here is the fancybox urls http://fancyapps.com/fancybox/

Change History (5)

comment:1 Changed 11 years ago by [email protected]

Sorry for blaming jsfiddle. Now it is clear how to use it. Here is the url http://jsfiddle.net/Cpqhy/5/

comment:2 Changed 11 years ago by [email protected]

Please check it with ie8. Ie9 and ff is working

comment:3 Changed 11 years ago by Rick Waldron

Owner: set to [email protected]
Status: newpending

Thank you for providing a fiddle, but we'll need a reduced test case that illustrates the issue using only the buggy code.

I did run your case in IE8 and this is what I saw: http://gyazo.com/06fe15614f23f1b7384df51ae36320c9.png

Can you confirm that this is the issue you're encountering?

comment:4 Changed 11 years ago by [email protected]

Status: pendingnew

Thanks for helping me out here. You're absolutely right. Setting the focus without a check if it's enabled is raising the error. In my script i've replaced this:

   afterShow : function () {

by that:

   afterShow : function () {
     if (typeof $("#theText").attr("disabled") == "undefined") {

Sorry, but my IE8 (IETester) didn't showed me this detailed message. Otherwise i wouldn't have wasted your time. Sorry.

comment:5 Changed 11 years ago by sindresorhus

Component: unfiledmisc
Priority: undecidedlow
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.