htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: WYSIWYG Forums: WYSIWYG Editor Discussion:
HTMLarea v3.0 not getting focus in Mozilla Firefox


 


timtak
Novice

Oct 2, 2013, 7:59 PM

Post #1 of 5 (107182 views)
Shortcut
HTMLarea v3.0 not getting focus in Mozilla Firefox Can't Post

I am using a very old version of Moodle online education software (the upgrade path was frequent and time consuming) with a very old version of Html Area (htmlarea v3.0).

Over the past year or two it has become difficult to click into the textarea using Mozilla Firefox. It works in Internet Explorer 10.

1) When hovering over the text area, the cursor does not change from its usual arrow, to the tall thin "H" rotated 90 degrees like this
http://md2.cc.yamaguchi-u.ac.jp/~eigo/images/htmlarea.jpg

2) I can get in to the textarea if I click on any toolbar button twice (which suggests some sort of javascript event handling thing perhaps?)

3) Fortunately if I click on the text area, rather than clicking on the textarea, the first button is clicked (even though I am not above it). This changes the cursor to "the tall thin rotated H" but I need to click a button again to make a flashing horizontal-line-cursor to appear, to start typing.

4) When I look at the CCS using Firefox's Developer Extension, then there is reported "No syle information" for the textarea, but a suspicious thin red line near the top of the textarea like this
http://md2.cc.yamaguchi-u.ac.jp/~eigo/images/htmlarea.jpg
It looks as if the first line of the text area is half pushed up behind the toolbar.


The html area is inside a password protected homework system so alas I can't let folks see the actual page.

Should anyone have any suggestions I would be very grateful.


timtak
Novice

Oct 2, 2013, 8:47 PM

Post #2 of 5 (107180 views)
Shortcut
Re: [timtak] HTMLarea v3.0 not getting focus in Mozilla Firefox [In reply to] Can't Post

Ha, no one has posted to this forum since 2009 other than spammers. So I am probably talking to myself. I am so OOOOLD.

I see that there is something called
textarea.offsetHeight

I aslo see that there are things like this

if (HTMLArea.is_moz) {

} else {
}

So I thought I might be able to add

if (HTMLArea.is_moz) {
textarea.offsetHeight = textarea.offsetHeight+5;
}

However, the addition of even
textarea.offsetHeight = textarea.offsetHeight+5;
or
textarea.offsetHeight = 5;
broke the code. Perhaps offsetHeight is a boolean variable since it is used in

textarea.offsetHeight && textarea.offsetHeight > 0

The use of the "&&" suggests boolean but the "> 0" suggests numerical. Perhaps "> 0" is the javascript way of saying TRUE?

Anyway it should be possible to use
if (HTMLArea.is_moz) {

}

Also I see that there are ways of changing style
http://stackoverflow.com/questions/16895256/expand-textarea-with-javascript-style-onclick
such as
textarea.style.backgroundColor="#ff0"
but as soon as I add even the above, the script crashes. I am adding it in the wrong place.

Since there is also
textarea.style.paddingTop="1px";

I should,if I were any good, be able to do

if (HTMLArea.is_moz) {
textarea.style.paddingTop="10px";
}

But as I say, as soon as I add anything to the code it crashes. And there is no-one else here except spammers!

Tim


timtak
Novice

Oct 2, 2013, 9:11 PM

Post #3 of 5 (107179 views)
Shortcut
ALMOST SOLVED [timtak] HTMLarea v3.0 not getting focus in Mozilla Firefox [In reply to] Can't Post

I was attempting to change the styles of the text area before it is get-ed (got)

this._textArea = textarea = HTMLArea.getElementById("textarea", textarea);

Then I added
textarea.style.backgroundColor="#ff0"; //takemoto
textarea.style.Color="#f00"; //takemoto
Which did nothing.


But I see that the textarea is being replaced by a htmlarea
So I tried this to see if I could change anything
htmlarea.style.backgroundColor="#ff0"; //takemoto
htmlarea.style.Color="#f00"; //takemoto

But nothing changes. At least the code is not breaking now.

AH! If I add this, then I can add a space as default value to the top of the text area which means I can now click in!
editor._textArea.value =" ";

But using firefox, the below does NOT work.
if (HTMLArea.is_moz) {
editor._textArea.value =" ";
}

But this DOES work
if (!HTMLArea.is_ie) {
editor._textArea.value =" ";
}
(The space does not get inserted when using IE)

Great. Students can get into the text areas again.


It is a little bit annoying to have a space at the front of every post. I tried "<div>" but that did not work. If anyone has any other suggestions (fat chance) then please post here, years later.

Other than that, problem almost solved.

Speaking to oneself is inspiring sometimes.

Tim


timtak
Novice

Oct 2, 2013, 9:34 PM

Post #4 of 5 (107178 views)
Shortcut
NOT SOLVED [timtak] HTMLarea v3.0 not getting focus in Mozilla Firefox [In reply to] Can't Post

No! That does not work because when editing a post, the post is replaced by a space!

I tried


Code
if (!HTMLArea.is_ie) { 
if editor._textArea.value ="" {
editor._textArea.value ="&nbsp;";
}
}

but that crashes


Code
 if (!HTMLArea.is_ie && editor._textArea.length = 0 ) { 
editor._textArea.value ="&nbsp;";
}
}

crashes too. And


Code
if (!HTMLArea.is_ie) { 
if (editor._textArea.length = 0) {
editor._textArea.value ="&nbsp;";
}
}


Does not work. The space is not inserted.

I have to give up, for now at least.


(This post was edited by timtak on Oct 2, 2013, 9:46 PM)


johnworne
New User

Mar 22, 2017, 4:22 AM

Post #5 of 5 (41492 views)
Shortcut
Re: [timtak] HTMLarea v3.0 not getting focus in Mozilla Firefox [In reply to] Can't Post

hello
my name is john and also new user.I don't have more idea about this topic.

regards
john worne
welcome everyone

(This post was edited by johnworne on Mar 22, 2017, 4:26 AM)

 
 
 


Search for (options)