| Author |
Message |
|
|
Post subject: [Closed] annoying behaviour of javascript editor
Posted: Jan 25, 2006 - 10:40 AM
|
|
Registered Member


Joined: May 03, 2004
Posts: 77
|
|
hello,
if I edit inside a javascript function and type the {
then the cursor jumps to the name of that function and selects it.
This is extremly annoying, because one always overwrites the name of the function with the code one wants to type after the opening {.
Example:
function doit(){
var comment=document.getElementById('comment').value;
if (comment!=null){
having typed this, doit will be selected.
regards Jürgen
eclipse:
Version: 3.1.1
Build id: M20050929-0840
myEclipse:
Version: 4.1.0
Build id: 20060122-4.1-GA
WindowsXP
|
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 26, 2006 - 01:38 AM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Moving to Web 2 and investigating |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 26, 2006 - 01:40 AM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
rateoty,
Can you paste an example file (stand along javascript or html, whatever you were editing) that caused this and also tell me your Javascript editor settings? I just tried this locally and can't reproduce it. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 26, 2006 - 10:38 AM
|
|
Registered Member


Joined: May 03, 2004
Posts: 77
|
|
hello,
this below is a small part of a bigger file. I copied it to a new file and still can reproduce the behaviour in the new file.
When i remove the '}' after the if(1<2), the showTranserElements will be selected. Same, if I remove the entire function and input it as an empty function. When afterwards I insert the 'if (1<2){' , it will do as I have described.
Not sure if this is worth mentioning: I'm using a german keybord layout - the '{' is on the AltGr+7, the '}' on AltGr+0
regards. Jürgen
-----------------------------------------------------------------------------------------------------------------------------------------
function showTranserElements(){
if(1<2){}
}
function setStyleClass(eId,styleClass){
var elem;
try {
elem = document.getElementById(eId);
if (elem===null){
return false;
}
if (elem.className){
elem.className=styleClass;
return false;
}
elem.style.className=styleClass;
}
catch (e) {
return false;//nothing to do if elemet doesn'exist or method isn't supported
}
return false;
} |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 26, 2006 - 01:55 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Jurgen,
I cannot reproduce this. Let's try something here:
1) File > switch workspace > C:\tempworkspace > hit OK
2) Create a new Web Project
3) Create a new javascript file, paste in the code youg ave me above
4) Go remove the '}' bracket after the if(i<2){ portion of the code, what happens? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 26, 2006 - 02:26 PM
|
|
Registered Member


Joined: May 03, 2004
Posts: 77
|
|
hello,
at the first glance, the problem doesn't occur.
BUT: another one and apparently connected one, does:
I pasted the code, deleted the bracket - the error is marked as it should be.
Then I inserted the bracket again. In a new line I inserted
var a=
I saved, then deleted the
a=
and whoops the function name is selected again.
This kind of behaviour I can reproduce in the original setting to.
So to me it looks like a validation problem.
regards Jürgen |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 26, 2006 - 03:07 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Hmm I can't reproduce this either. I tried selecting a= and hitting delete AND pressing backspace to remove the "a=" and neither one caused the function name to be selected, here is my snippet, what am I doing wrong?
| Quote: |
function showTranserElements(){
if(1<2){
var a=
}
}
|
|
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 31, 2006 - 02:19 PM
|
|
Registered Member


Joined: May 03, 2004
Posts: 77
|
|
hi,
I don't know, what's the difference between your and my setting. Sometimes the behaviour will not show, sometimes it does. Strange enough, it differs even with different functions.
regards Jürgen |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 02, 2006 - 09:19 PM
|
|

Joined: Sep 01, 2004
Posts: 33
|
|
| rateoty wrote: | hello,
at the first glance, the problem doesn't occur.
BUT: another one and apparently connected one, does:
I pasted the code, deleted the bracket - the error is marked as it should be.
Then I inserted the bracket again. In a new line I inserted
var a=
I saved, then deleted the
a=
and whoops the function name is selected again.
This kind of behaviour I can reproduce in the original setting to.
So to me it looks like a validation problem.
regards Jürgen |
I can vouch that this is a real problem, and an extremely annoying one at that. The only reason I never said anything is because I know that don't want to spend the time reproducing it. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 04, 2006 - 08:10 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
No need guys with Brian's help we reproduced this internall, we are filing it and looking into it now.
The workaround is to turn off the alpha-sorting in the outline view (what is happening very quickly is the outline view is changing structure and a select is occuring in that view, which highlights the method in the editor). |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Mar 06, 2006 - 01:56 PM
|
|
Registered Member


Joined: May 03, 2004
Posts: 77
|
|
hello,
is there a schedule, when a fix will be available? Since some of my scripts are rapidly getting lengthy, without alphabetically sorting them is not very convenient working.
regards Jürgen |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Mar 06, 2006 - 02:12 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
This was fixed in 4.1.1 Jurgen, please upgrade and let us know. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Mar 09, 2006 - 12:56 PM
|
|
Registered Member


Joined: May 03, 2004
Posts: 77
|
|
hello,
after upgrading it works like it should. thanks.
regards Jürgen |
|
|
| |
|
|
|
 |
|
|