jQuery UI-Firefox中的对话框隐藏效果-闪烁 [英] jQuery UI - Dialog Hide Effect in Firefox - Flickering

查看:106
本文介绍了jQuery UI-Firefox中的对话框隐藏效果-闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个函数,可以在动态生成的元素上调用.dialog.代码:

I have a function that calls .dialog on a dynamically generated element. The code:

dialog: function(message){
    $('<div>').attr('innerHTML',message).dialog({
        draggable: false,
        width: 500,
        hide: 'puff',
        resizable: false,
        bgiframe: true,
        modal: true,
        buttons: {
            Ok: function() {
                $(this).dialog('close');
            }
        }
    });
};

(对话框是名为Global的对象的功能)

(dialog is a function of an object named Global)

当我在IE中关闭对话框时,效果将达到预期效果.但是,在Firefox中,隐藏效果是各种锯齿状和轻浮的".我看到过其他有关FF中UI闪烁"的问题,但它们似乎不太适合我的情况.

When I close the dialog in IE, the effect works as expected. However, in Firefox the hide effect is all sorts of jagged and 'flicky'. I've seen other questions asked about the UI 'flickering' in FF, but they didn't quite seem to fit my situation.

请给我一些好消息,并告诉我我做错了,Firefox支持这些效果.

Please, give me some good news and tell me that I'm doing something wrong and Firefox DOES support these effects.

这是IE成功而FF失败的少数几次.

This is one of the few times that IE has been successful while FF failed.

推荐答案

我在滚动条和可见性方面也遇到了类似的问题.这不是FireFox错误.我可以将其追溯到jQuery中的一行,其中在css()函数中它调用swap()函数:

I have had a similar problem with scrollbars and visibility. It is not a FireFox bug. I could trace it down to a line in jQuery where in the css() function it calls the swap() function:

jQuery.swap( elem, props, getWH );

请参考 http://dev.jquery.com/ticket/5743 为什么会这样.

jQuery交换功能临时更新DOM,强制FireFox刷新页面.您可能想通过示例创建一个测试用例,然后在jQuery中注释掉swap调用以验证这一点,并在jQuery票务系统中提交另一个错误.

The jQuery swap function temporarily updates the DOM forcing FireFox to refresh the page. You may want to make a testcase from your example, then comment out the swap call in jQuery to verify this and file another bug in the jQuery ticket system.

这篇关于jQuery UI-Firefox中的对话框隐藏效果-闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆