JS 탭에서 코드를 삭제할 때 발생하는 오류

워크플로:

  1. 어딘가에서 복사한 스크립트가 있습니다.
  2. 제가 만든 커스텀 컴포넌트의 JS 탭에 붙여넣습니다.
  3. 저장(SAVE) 버튼을 누릅니다.
  4. 어딘가에서 스크립트를 수정한 후 복사합니다.
  5. JS 탭에서 CMD+A를 눌러 전체 스크립트를 선택합니다.
  6. DELETE 키를 누릅니다. 삭제되지 않습니다. 대신 커서가 스크립트 맨 앞으로 이동합니다.

스크립트를 실제로 삭제하고 새 버전을 붙여넣을 수 있도록 다시 전체 선택을 한 후 DELETE 키를 눌러야 합니다.

이것은 전체 화면 모드와 관련된 문제라고 생각합니다. 여기서 일어나는 일은 다음과 같습니다: (전체 화면에서) 스크립트를 삭제한 후 작게 보기 버튼을 클릭하면, 삭제했음에도 불구하고 스크립트가 다시 나타납니다. 뭔가 문제가 있는 것 같습니다.


수정: 실제로는 전체 화면과 관련이 없습니다. 예를 들어, 스크립트를 추가하고 저장한 후 커서를 어딘가에 배치하여 문자를 삭제하려고 하면, (전체 화면이든 아니든) 커서가 스크립트 맨 위로 점프합니다.

1개의 좋아요

Can you confirm if you are on the latest version of Discourse?

1개의 좋아요

Yes, 3.5.0.beta8-dev

I can’t repro this so far. What browser is it? Could you do a video to be sure we are not misunderstanding something please?

2개의 좋아요

Chrome Version 128.0.6613.138 (Official Build) (x86_64).

This is not something that happens all the time, but it happens. I can’t pinpoint how or when it happens. It seems kinda random.

But the issue is pretty simple to explain:

  • I open the Custom Code section of a custom component I created
  • Go to the JS tab where I already have some script
  • On my clipboard I have a new script to paste
  • I select all the script in the JS tab
  • Hit DELETE
  • The typing cursor (or whatever that thing is called) goes to the top of the window, the beginning of the script. It doesn’t delete it. I have to hit DELETE a second time to actually delete it so I can paste the new script.

That’s all I noticed so far. Again, I can’t really reproduce the issue all the time in order to make a video. I just tried, and nothing was wrong.

It’s a big deal, but something happens sometimes that causes this.

1개의 좋아요

I was able to record this yesterday.

In the video you can see me paste a script, save, select all, hit Delete, which takes me back to the top, placing the cursor before the word Import

I noticed this usually happens when I make changes to the script, or when I delete an old script and paste a new one. It’s not always the case, I guess, but it’s something I noticed.

2개의 좋아요

나도 방금 같은 일이 생긴 것 같습니다. 영상이 도움이 될지 모르겠네요:

Strg는 독일식 키보드에서 Ctrl 키입니다.

3개의 좋아요

다시 Discourse를 설치했으니, 문제가 여전히 존재한다고 말씀드릴 수 있습니다. :confused:

또 다른 문제가 있습니다. 일반 크기로 작업하다가 풀스크린으로 전환하면 모든 변경 사항이 사라집니다! 즉, 30분 동안 변경 사항을 적용하다가 풀스크린으로 전환하면 모든 것이 사라집니다! :exploding_head: