| 70 | | focus(getElement()); |
| | 71 | if (BrowserInfo.get().isSafari() |
| | 72 | && BrowserInfo.get().getWebkitVersion() < 526) { |
| | 73 | // old webkits don't support focusing div elements |
| | 74 | Element fElem = DOM.createInputCheck(); |
| | 75 | DOM.setStyleAttribute(fElem, "margin", "0"); |
| | 76 | DOM.setStyleAttribute(fElem, "padding", "0"); |
| | 77 | DOM.setStyleAttribute(fElem, "border", "0"); |
| | 78 | DOM.setStyleAttribute(fElem, "outline", "0"); |
| | 79 | DOM.setStyleAttribute(fElem, "width", "1px"); |
| | 80 | DOM.setStyleAttribute(fElem, "height", "1px"); |
| | 81 | DOM.setStyleAttribute(fElem, "position", "absolute"); |
| | 82 | DOM.setStyleAttribute(fElem, "opacity", "0.1"); |
| | 83 | DOM.appendChild(getElement(), fElem); |
| | 84 | focus(fElem); |
| | 85 | } else { |
| | 86 | focus(getElement()); |
| | 87 | } |