Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
add ugly workaround for error popup position problem (overlaps text i…
Browse files Browse the repository at this point in the history
…n Firefox)
  • Loading branch information
danielnaber committed Dec 22, 2013
1 parent 795434b commit c170eb1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,17 @@ AtDCore.prototype.isIE = function() {
ed.selection.select(e.target);
p1 = dom.getPos(e.target);
var xPos = p1.x;
m.showMenu(xPos, p1.y + e.target.offsetHeight - vp.y);

// moves popup a bit down to not overlap text:
//TODO: why is this needed? why does the text (tinyMCE content) have a slightly lower start position in Firefox?
var posWorkaround = 0;
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
posWorkaround = 10;
} else {
posWorkaround = 2;
}

m.showMenu(xPos, p1.y + e.target.offsetHeight - vp.y + posWorkaround);
this.menuVisible = true;
var menuDiv = $('#menu_checktext_spellcheckermenu_co');
if (menuDiv) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,17 @@
ed.selection.select(e.target);
p1 = dom.getPos(e.target);
var xPos = p1.x;
m.showMenu(xPos, p1.y + e.target.offsetHeight - vp.y);

// moves popup a bit down to not overlap text:
//TODO: why is this needed? why does the text (tinyMCE content) have a slightly lower start position in Firefox?
var posWorkaround = 0;
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
posWorkaround = 10;
} else {
posWorkaround = 2;
}

m.showMenu(xPos, p1.y + e.target.offsetHeight - vp.y + posWorkaround);
this.menuVisible = true;
var menuDiv = $('#menu_checktext_spellcheckermenu_co');
if (menuDiv) {
Expand Down

0 comments on commit c170eb1

Please sign in to comment.