Ticket #12182 (closed bug: invalid)
jQuery initialization problems in Safari for Windows
|Reported by:||martinh@…||Owned by:||martinh@…|
There seem to se a problem with jQuery initialization which breaks the key binding event model in Safari for Windows (v 5.1.7). We found this using jQuery together with CodeMirror.net component which works based on input to hidden textarea field, and didn't properly consume the space key (every other space key press was handled).
We were able to track this down to the following code lines:
1621: div.innerHTML = "<div style='width:5px;'></div>"; 1626: div.innerHTML = html;
It seems that Safari doesn't like further DOM manipulation to existing structure within this life cycle event.
We were able to fix this by creating new elements for further processing:
/* CMS */ // Fix for Safari vs. CodeMirror div = document.createElement("div"); container.appendChild(div); /* CMS end */ div.innerHTML = "<div style='width:5px;'></div>"; support.shrinkWrapBlocks = (div.offsetWidth !== 3); } /* CMS */ // Fix for Safari vs. CodeMirror div = document.createElement("div"); container.appendChild(div); /* CMS end */ div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility; div.innerHTML = html;
Please advise whether our fix is correct or may cause unwanted behavior.
Martin Hejtmanek, CTO Kentico software
- Owner set to martinh@…
- Status changed from new to pending
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from pending to closed
- Component changed from unfiled to support