(Jul-29-2017, 12:46 PM)nilamo Wrote:(Jul-28-2017, 05:05 PM)metulburr Wrote: Ive tried numerous time. Even went into chrome settings and cleared everything out, including password, cached images, browser history, etc. Tried a lot of times with Ctrl + F5. I cant seem to get it to work at all.
It works for me on Chrome, on Windows.
It DOES NOT work in Internet Explorer. Furthermore, opening IE's dev tools to try to find out why actually crashes the browser.
It also DOES NOT work in Edge. But the dev tools DO work here, and I see an error (.append does not exist).
Edge is actually fairly standards compliant, which means there's probably an actual issue with how I was doing it before. This new version works in all the browsers I've tested. I think the issue boils down to the fact that the new quick-editor is in an iframe, and different browsers treat iframes differently. .append() is a jquery thing, so I changed it to just use raw DOM manipulation instead.
function insert_text(text, spaces, popup) { var textarea; if (!popup) { //textarea = document.forms[form_name].elements[text_name]; textarea = document.forms[form_name].getElementsByTagName("iframe")[0].contentDocument.body; } else { textarea = opener.document.forms[form_name].elements[text_name]; } if (spaces) { text = ' ' + text + ' '; } if (!isNaN(textarea.selectionStart)) { var sel_start = textarea.selectionStart; var sel_end = textarea.selectionEnd; mozWrap(textarea, text, ''); textarea.selectionStart = sel_start + text.length; textarea.selectionEnd = sel_end + text.length; } else if (textarea.createTextRange && textarea.caretPos) { if (baseHeight != textarea.caretPos.boundingHeight) { setTimeout(function() { textarea.focus(); }, 10); storeCaret(textarea); } var caret_pos = textarea.caretPos; caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; } else { if (popup) { textarea.value = textarea.value + text; } else { var content = document.createElement("span"); content.innerHTML = text; textarea.appendChild(content); } } if (!popup) { //setTimeout(function() { textarea.focus(); }, 10); } }
Back to the issue regarding the fast quote i have been having....If i look at the source code, in firefox it shows an iframe, but it does not shows the same iframe for me in chrome, but a textarea. Might this be why i am not having it work in chrome? The screenshot given is of chrome on left and firefox on right, with the same location for inspection. firefox shows the iframe, but chrome shows a textarea.
Recommended Tutorials: