lw-bobbimartin / simplemodal

Automatically exported from code.google.com/p/simplemodal
0 stars 0 forks source link

Bug with IE8 #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

the fixIE: function () cause error in IE8 browser.

The program stop at the line : s.removeExpression('height');
with error "not implemented"

I've done a very quick and crap fix :
at the top of the function fixIE, i leave the function when browser is IE8 :

if ($.browser.msie && parseInt($.browser.version) == 8) return;

I don't know if it could produce other bugs... but in global overview, it
seem to work good.

I hope you can check and fix the bug properly :)

Original issue reported on code.google.com by bonux...@gmail.com on 26 Apr 2009 at 9:04

GoogleCodeExporter commented 9 years ago
What version of jQuery are you using? 

Please try the 1.3-b1 version and let me know if you still experience the issue.

Original comment by emartin24 on 22 May 2009 at 9:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I use jquery 1.3.2, simplemodal 1.3. This bug is appear when html doctype is 
specified, otherwise it's worked fine.

Original comment by 40i...@gmail.com on 26 Jun 2009 at 10:31

GoogleCodeExporter commented 9 years ago
I've tried to reproduce, but am unable to. If you have a sample page, please 
let me know.

Original comment by emartin24 on 20 Aug 2009 at 6:26

GoogleCodeExporter commented 9 years ago
40inss. 
You need to give specifics and examples. emartin can't fix it if he doesn't 
know what
your environment is.

What is the doctype? (include the full string)
What are your configuration variables? (includ them here)

Best would be for you to put a sample up on the internet somewhere that will
reproduce your problem, then provide the link here.

Thanks,

Donovan

Original comment by donovan....@gmail.com on 20 Aug 2009 at 10:09

GoogleCodeExporter commented 9 years ago
I had the same problem using simplemodal 1.2.2 and jQuery 1.3.1.
I tried with simplemodal 1.3+ and it works fine.

I've attached a sample page showing the error when using simplemodal 1.2.2.

Original comment by mcampo85@gmail.com on 4 Nov 2009 at 5:29

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had the same problem under jQuery 1.3.2 and SimpleModal 1.3.3 and I noticed 
ieQuirks returned true in IE8 and therefore the SimpleModal function fixIE() 
was 
internally called.

Turns out I called .modal() too early.... Once I called it in .ready() function 
it 
was ok.

Here is jQuery documentation on $.support.boxModel:

boxModel: Is equal to true if the page and browser are rendering according to 
the 
http://www.w3.org/TR/REC-CSS2/box.html (is currently false in IE 6 and 7 when 
they 
are in Quirks Mode). This property is null until document ready occurs.

Benny

Original comment by bhalperin@gmail.com on 13 Dec 2009 at 12:11

GoogleCodeExporter commented 9 years ago
I think the cause of this issue is calling .modal() before the DOM is loaded. 
Closing.

Original comment by emartin24 on 23 Feb 2010 at 4:20

GoogleCodeExporter commented 9 years ago
Hi, I´ve got the same problem with jquery 1.4.2 and jquery.simplemodal-1.4.1.
I´ve tried things like :
$(document).ready(function () {
 $("#modal").modal();
});
but this didn´t work for me.
I also tried to change the ieQuirks = $.browser.msie && !$.boxModel; to 
ieQuirks = jQuery.support.boxModel; but I haven´t obtain the expected results.

Finally I used the solution to issue #1 and for the moment it works. 

But I´m having another problem with the same simplemodal jquery, in other page 
in the same project, when I tried to show the modal panel it says that the 
object doesn´t accept the property or method, it´s quite strange because I´m 
using the same code in each page (changing the option in the onShow) and it 
continues showing this error. 

This is my code :

function ErroresTicket(sTipoError) {
            //mostramos el div que contiene el panel modal
            objetoVisibility('modal', 'S');
            objetoVisibility('Contenido_btn', 'S');

            $("#modal").modal(
                {
                    persist: true,

                    appendTo :'body',

                    close :false,

                    onShow:function(){

                        var texto= Traducir(sTipoError);
                        $("#Contenido_textomensaje").text(texto);
                        $("#Contenido_cerrar").click(function(){
                            $.modal.close();
                            return false;
                        });
                    },

                    onClose:function(){
                        //cerrar la ventana modal, si no ponemos esto no se cerrarrá
                        $.modal.close();
                        objetoVisibility('Contenido_btn', 'N');
                        objetoVisibility('modal', 'N');

                    }
                });
        }

       function objetoVisibility(id, mostrar) {
            var obj = document.getElementById(id);
            if (obj != null) {
                if (mostrar == 'S') {
                    obj.style.visibility = "";
                } else {
                    obj.style.visibility = "hidden";
                }
            }
        }

        function objetoDisplay(id, mostrar) {
            var obj = document.getElementById(id);
            if (obj != null) {
                if (mostrar == 'S') {
                    obj.style.display = "";
                } else {
                    obj.style.display = "none";
                }
            }
        }

The function Traducir is just a switch-case where I choose the message I want 
to show in the label of my modal.

Original comment by RGSanzGarcia@gmail.com on 8 Mar 2011 at 12:27