Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

CSSInlineEditor: Design fail when deleting a rule in the css file itself #5643

Closed
marcelgerber opened this issue Oct 23, 2013 · 11 comments
Closed
Assignees
Milestone

Comments

@marcelgerber
Copy link
Contributor

  1. Go to Getting Started\index.html
  2. Open an Inline Editor on <body>
  3. Create a New Rule, you can leave it blank. But leave it selected in the right list.
  4. Switch to main.css in the file tree
  5. Delete the new rule from the stylesheet
  6. Switch back to index.html

Result: The list on the right is messed up (see screen)

Expected: The entry body - main.css : 10 should be selected

I did a little testing, too. It only happens when the deleted rule is active in the list. It also happens when you create more than one new rule.
It's not caused by extensions (I disabled all)

image

@njx, I know you like these bugs 😀

@njx
Copy link

njx commented Oct 23, 2013

Also, I noticed that if you delete the last rule, when you switch back to the editor, you see the inline editor briefly pop open and then shut. That might be a different issue, but worth investigating at the same time. (It's probably been this way since the animation stuff got added.)

@ghost ghost assigned njx Oct 23, 2013
@njx
Copy link

njx commented Oct 23, 2013

To me, nominating for sprint 34.

@marcelgerber
Copy link
Contributor Author

This happens in JavaScriptQuickEdit too, so it probably is a bug in MultiRangeInlineEditor. I will take a look, but I can't prove I'll be able to fix it.

@marcelgerber
Copy link
Contributor Author

Ok, I'm just too stupid to get it fixed :(

@njx
Copy link

njx commented Oct 24, 2013

Nah, just not familiar with the codebase :) I'll take a look next sprint.

@marcelgerber
Copy link
Contributor Author

Oh, I just found out where the problem comes from, but I don't know how to fix it:
As the InlineEditor is hidden while the changes are made (it's in another document), itemTop = $rangeItem.position().top, can't get the position in MultiRangeInlineEditor : 445.

See jQuery documentation:

Note: jQuery does not support getting the position coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.

@marcelgerber
Copy link
Contributor Author

Should we maybe call _updateSelectedMarker() when switching back to the document where the InlineEditor is in or is there a better solution (I think there will be one...)

@marcelgerber
Copy link
Contributor Author

@njx: Have you thought about a solution yet?

@njx
Copy link

njx commented Oct 28, 2013

I'll be looking at this next sprint.

@redmunds
Copy link
Contributor

redmunds commented Nov 9, 2013

Closing. @SAplayer Let us know if this is not fixed for you.

@redmunds redmunds closed this as completed Nov 9, 2013
@marcelgerber
Copy link
Contributor Author

Confirmed fixed. Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants