- This topic has 12 replies, 3 voices, and was last updated 18 years, 8 months ago by rateoty.
-
AuthorPosts
-
rateotyMemberhello,
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-GAWindowsXP
Riyad KallaMemberMoving to Web 2 and investigating
Riyad KallaMemberrateoty,
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.
rateotyMemberhello,
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;
}
Riyad KallaMemberJurgen,
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?
rateotyMemberhello,
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
Riyad KallaMemberHmm 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?
function showTranserElements(){
if(1<2){
var a=
}
}
rateotyMemberhi,
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
haobaba1Member@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.
Riyad KallaMemberNo 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).
rateotyMemberhello,
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
Riyad KallaMemberThis was fixed in 4.1.1 Jurgen, please upgrade and let us know.
rateotyMemberhello,
after upgrading it works like it should. thanks.
regards Jürgen
-
AuthorPosts