Skip to content

Fix Copying Multiple Styles When Multiple Selected #11

@KieranP

Description

@KieranP

We can use the multiple select method to select all elements we have positioned, when we click Cmd+C to copy the styles for all of them, it doesn't always work. Here is a reproducible test case:

<html>
  <head>
    <title>Positionable! Test</title>

    <style type="text/css">
      input { position: absolute; }
      #field1 { top: 0px; }
      #field2 { top: 50px; }
      #field3 { top: 100px; }
      #field4 { top: 150px; }
      #field5 { top: 200px; }
    </style>
  </head>
  <body>
    <input id="field1" type="text" />
    <input id="field2" type="number" />
    <input id="field3" type="password" />
    <input id="field4" type="checkbox" />
    <input id="field5" type="radio" />
  </body>
</html>

Reproducible steps (using either "Cmd+A & Cmd+C" or the dragging method to select all):

  • Nothing clicked + Select all => Works
  • Click Field1 + Select all => Works
  • Click Field2 + Select all => Works
  • Click Field3 + Select all => FAILS
  • Click Field4 + Select all => FAILS
  • Click Field5 + Select all => FAILS

So it seems that if certain elements are last selected (password/checkbox/radio fields), then positionable is not properly copying styles when multiple are selected. Work around is to make sure we last clicked a plain text field, but that is a bit cumbersome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions