Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-06-12 22:45:03

chasin
New member
Registered: 2005-06-12
Posts: 5

problem and quick question

Hi folks, I just started working Xinha, great stuff! 

I have quick question, after Xinha loads in the browser, how do make the focus on the editor, currently the menu is disabled after Xinha loads and you must click in the editor to have the menu buttons highlight.   I tried focus editor but that doesn't work?

I ran into an ugly scenario and and didn't find any mention in the discussion forum, but found a ticket 315 describing the problem http://xinha.python-hosting.com/ticket/315.   I'm not a javascript expert but learning and I traced the problem to when Xinha is loaded in a table cell instead of the main body.  (Maybe most people just load Xinha in the main body)  My web page uses a table for layout so Xinha's text area is specified in a table cell.   Now when you click on the right button in the editor, the menu is full screen  height and the width is way off, it looks real bad.   Coud the offsetWidth and offsetHeight be getting their sizes from the table instead of the div:   (here is where i traced the problem to)

var foobar = document.createElement("div");
foobar.className = "htmlarea-context-menu";
foobar.innerHTML = div.innerHTML;
document.body.appendChild(foobar);
var w = foobar.offsetWidth;
var h = foobar.offsetHeight;
document.body.removeChild(foobar);
this.iePopup.show(ev.screenX, ev.screenY, w, h);

The offsetWidth and offsetHeight (ie. w and h) are much to high and wide.  Any ideas out there?   Thanks in advance.

Offline

Board footer

Powered by FluxBB