Solution to ComboBox and DateField disappearing in IE_extjs
WBOY
Release: 2016-05-16 17:23:43
Original
1148 people have browsed it
Foreword
As the basic Form components of Ext JS, there is nothing difficult about these two. However, during the development process, we encountered that in the IE browser, zooming in and out of the window size would cause these two components to disappear. Clicking on certain places can display them again. No errors are reported. It works fine in other browsers.
The situation where the problem occurred
Because Ext js is imported on the basis of the original project, the form in the page is not created through the standard form component first, and then add The form field method is used. What we use here is pure html form and input, and then use Ext js to render the input into Combobox and DateField.
Let’s talk about the mechanism of combobox generation:
1. Find the original input by Id 2. Find the parent of this input (the original input can be deleted) 3. Create a new Ext js Combobox component and render to the parent of the original input. (id is set to the original input id)
At first I thought it was the original The input is destoryed, making it impossible to render. Changing it to hide(), or setDisabled, or setVisable will not work.
The above td still exists on the page, but its position has changed and it is no longer under the table.
It seems to be caused by Css. Delete x-form-item-body in IE Developer. It works normally in IE. I'm happy.
Look at the definition of x-form-item-body in Ext js
static is the default value of position, which is equivalent to no set value. Everything is normal ^^ But there is a problem. Chrome and Firefox do not have this problem. To be on the safe side, changes to the original functions should have as little impact as possible. Add conditional comments:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn