- This topic has 12 replies, 3 voices, and was last updated 19 years, 3 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
January 25, 2006 at 7:38 pm #245335
Riyad KallaMemberMoving to Web 2 and investigating
January 25, 2006 at 7:40 pm #245336
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.January 26, 2006 at 4:38 am #245366
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;
}January 26, 2006 at 7:55 am #245383
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?January 26, 2006 at 8:26 am #245394
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
January 26, 2006 at 9:07 am #245399
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=
}
}January 31, 2006 at 8:19 am #245738
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ürgenFebruary 2, 2006 at 3:19 pm #245964
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.
February 4, 2006 at 2:10 pm #246096
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).
March 6, 2006 at 7:56 am #247785
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
March 6, 2006 at 8:12 am #247792
Riyad KallaMemberThis was fixed in 4.1.1 Jurgen, please upgrade and let us know.
March 9, 2006 at 6:56 am #248144
rateotyMemberhello,
after upgrading it works like it should. thanks.
regards Jürgen
-
AuthorPosts