brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Cannot select with double-click in CSS inline editor after closing one css file in the working set. #6558

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by RaymondLim Thursday Mar 20, 2014 at 02:23 GMT Originally opened as https://github.com/adobe/brackets/issues/7258


  1. Set the "citrus completed" from smoke test as your project.
  2. Duplicate desktop.css in the css folder and call it desktop2.css.
  3. Open index.html and set cursor in the body tag.
  4. Resize the editor window narrower so that you see some wrapped lines in inline editor.
  5. Ctrl+E to open the inline editor. You will see two entries in the css file list on the right of the inline editor.
  6. Select desktop2.css from the list and then change the color property to #d90.
  7. When desktop2.css is in the working set, mouse over its filename and click x button to close it.
  8. When prompted to save, click Don't Save.
  9. Inline editor in index.html is now showing desktop.css.
  10. Try to double-click on something inside the inline editor. e.g. #000.

Result: Something else on the previous line may be highlighted as being selected. Note that the inline editor shows some extra empty lines at the bottom and if you click there, then it auto resizes to fit the content. After that, double-click is working again.

core-ai-bot commented 3 years ago

Comment by RaymondLim Thursday Mar 20, 2014 at 02:25 GMT


Not sure it has to do with multi-select in cmv4, but I can't reproduce it in sprint 33 build with the exact same steps.

core-ai-bot commented 3 years ago

Comment by RaymondLim Thursday Mar 20, 2014 at 05:21 GMT


Not only double-click is not functioning correctly, even single click may set cursor at the wrong place.

core-ai-bot commented 3 years ago

Comment by peterflynn Thursday Mar 20, 2014 at 07:42 GMT


Seems UTR for me. No extensions?

core-ai-bot commented 3 years ago

Comment by RaymondLim Thursday Mar 20, 2014 at 14:51 GMT


No extensions and still reproduced. Need to make sure Word Wrap is on and your editor window has to be narrower. When setting cursor or selecting in the last step, make sure to click somewhere in color or background-color properties.

core-ai-bot commented 3 years ago

Comment by redmunds Thursday Mar 20, 2014 at 17:53 GMT


This was found during multi-cursor/cmv4 testing, so adding cmv4 label.

core-ai-bot commented 3 years ago

Comment by redmunds Thursday Mar 20, 2014 at 17:59 GMT


I am unable to reproduce this bug on Win7, but I'm seeing another bug after Step 9 -- the list of selectors goes away. Even though changes to desktop2.css were discarded, the body rule still exists and should be shown in the list.

core-ai-bot commented 3 years ago

Comment by redmunds Thursday Mar 20, 2014 at 18:03 GMT


I figured out how to reproduce and updated Step 4 of recipe. Editor window needs to be narrow enough to show wrapping text in inline editor. I can reproduce this in Sprint 37, so I removed cmv4 label.

core-ai-bot commented 3 years ago

Comment by RaymondLim Thursday Mar 20, 2014 at 18:21 GMT


@redmunds Yes, the list of selectors disappear is also a bug after step 9.

core-ai-bot commented 3 years ago

Comment by peterflynn Thursday Mar 20, 2014 at 21:20 GMT


@redmunds If there's one selector left in the list, then the list is supposed to disappear.

What makes that confusing in this case is that one of the results disappears when the selector hasn't actually gone away. This is because the file-revert implied by Don't Save blows away the entire file contents atomically, which is an edit crossing the selector boundaries. I thought the entire inline editor is supposed to snap shut in that case though -- not just removing that one rule from the list (which seems like it could be confusing in many other boundary-edit cases as well). @njx Did we change that logic at some point?

(Afaict this is all tangential to the actual selection bug Raymond is describing though...)

core-ai-bot commented 3 years ago

Comment by peterflynn Monday Mar 24, 2014 at 18:31 GMT


@RaymondLim Are other things broken too, like drag to select, or single click to set a cursor? Or is it literally just double-click..?

core-ai-bot commented 3 years ago

Comment by pthiess Monday Mar 24, 2014 at 18:32 GMT


@RaymondLim - this might not be a medium if its hard to hit and only the one workflow described. I took of the release 38 milestone.

core-ai-bot commented 3 years ago

Comment by njx Monday Mar 24, 2014 at 19:28 GMT


@peterflynn Yes, I think we did change some logic to remove rules instead of closing the whole editor in cases where the text range goes out of sync. You're right that in general if we start going down that path we probably need to actually also better detect when relevant rules are created as well, which we're not doing today.

Ultimately I think the right solution is to have a persistent CSS code model along the lines of what@dangoor has proposed.

core-ai-bot commented 3 years ago

Comment by njx Tuesday Apr 01, 2014 at 01:04 GMT


Closing - fixed by filer and I confirmed.