FIX: Opera Improvements (v12)

Fix issues with Opera 12 and its ability to utilize Discourse Composer window
https://meta.discourse.org/t/support-for-opera/20218
This commit is contained in:
cpradio 2014-09-19 22:47:27 -04:00
parent 4e5e7d718e
commit 9e3060a6f7

View File

@ -43,8 +43,7 @@
// Used to work around some browser bugs where we can't use feature testing.
uaSniffed = {
isIE: /msie/.test(nav.userAgent.toLowerCase()),
isIE_5or6: /msie 6/.test(nav.userAgent.toLowerCase()) || /msie 5/.test(nav.userAgent.toLowerCase()),
isOpera: /opera/.test(nav.userAgent.toLowerCase())
isIE_5or6: /msie 6/.test(nav.userAgent.toLowerCase()) || /msie 5/.test(nav.userAgent.toLowerCase())
};
var defaultsStrings = {
@ -743,7 +742,7 @@
return;
}
if (inputArea.selectionStart !== undefined && !uaSniffed.isOpera) {
if (inputArea.selectionStart !== undefined) {
inputArea.focus();
inputArea.selectionStart = stateObj.start;
@ -1325,10 +1324,6 @@
makeSpritedButtonRow();
var keyEvent = "keydown";
if (uaSniffed.isOpera) {
keyEvent = "keypress";
}
util.addEvent(inputBox, keyEvent, function (key) {
// Check to see if we have a button key and, if so execute the callback.