Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dom cache unable to find correct element if duplicate element types are on the same line #74

Open
ikbenben opened this issue Jan 3, 2015 · 0 comments
Labels
Milestone

Comments

@ikbenben
Copy link
Collaborator

ikbenben commented Jan 3, 2015

The DOM cache is unable to find the correct element if the same type of element (ie 2 div elements) exist on the same element. the cache will always returns the first element.

An example of the scenario is:

<div class="header"><div class="title">This is the title</div></div>

The are two results because of this error:

  • the inspect mode will only activate the first element in the code editor even when the user clicks on the second item in the frame
  • opening the css inline editor will always open for the first element regardless of which element is currently active

To reproduce (issue 1):

  1. open an html document and make sure that there is a line with two elements of the same type on it as per the example above.
  2. switch to responsive mode and ensure a media query is selected
  3. turn on the inspect mode
  4. hover over the div.title element in the preview pane. it should be highlighted with the rest of the pane in a dark grey
  5. click on the element in the preview pane.

At this point the editor area will scroll to the correct line but the first element (div.header) will be active, not the div.title element
wrong-element-selected

To reproduce (issue 2):

  1. open an html document and make sure that there is a line with two elements of the same type on it as per the example above.
  2. switch to responsive mode and ensure a media query is selected
  3. activate the div.title element in the code editor and click on cmd-e to open the inline css editor.

At this point the editor opens but the contents are for the first div element, not the second element:
duplicate-element

@ikbenben ikbenben added the bug label Jan 3, 2015
@ikbenben ikbenben modified the milestones: 0.0.8, 0.2.0 Jan 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant