为什么 Firefox 不显示正确的默认选择选项? [英] Why doesn't Firefox show the correct default select option?

查看:20
本文介绍了为什么 Firefox 不显示正确的默认选择选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个网络应用来管理产品 SKUS.其中一部分是将 SKU 与产品名称相关联.在表格的每一行,我都会列出一个 SKU 并显示一个带有产品名称的 在每一行.

There are a lot of product <option>s - 103 to be exact - and this list is repeated in the <select> on each row.

从页面上的另一个输入,我使用 jQuery AJAX 请求来添加新的 SKU/产品关联,并清楚地表明它们是立即添加的,我将它们插入到顶部带有一点高光效果的表.随着 SKU 的数量增加超过 10 个左右,如果我刷新页面(从按产品名称排序的数据库中加载所有内容),Firefox 开始显示一些默认选择的错误选项.它显示哪个不正确的选项并不一致,但它似乎混淆了页面重新加载之前存在的选项.

From another input on the page, I am using jQuery AJAX requests to add new SKU/product associations, and to make it clear that they're added instantly, I insert them into the top of the table with a little highlight effect. As the number of SKUs increases past 10 or so, if I refresh the page (which loads everything back out of the database ordered by product name), Firefox starts to show some wrong options as selected by default. It is not consistent about which incorrect option it shows, but it seems to be mixing up the options that existed before the page reload.

如果我使用 Firebug 检查 和一长串 ,当前值设置为默认值莉>

  • 现在,我将当前值放在 中.如果用户点击改变"按钮,我将 替换为 按钮变成确认"按钮.如果他们更改选项并单击确认,AJAX 会更新数据库,
  • 发送“验证码”获取 | 15天全站免登陆