Skip to content

Clicking "Reset Grid" appears to disable the click & drag motion #56

@SeanKilleen

Description

@SeanKilleen

Thanks for this awesome site! Dropping this here to start my own investigation and I figure someone else may beat me to the fix, which is fine.

Reproduction

  • Open the site (in my case, in Chrome)
  • Click and drag to create a div
  • Click "Reset Grid" button
  • Attempt to drag over another region to start again

Expected behavior: Drawing still works
Actual behavior: Don't seem to be able to click & drag anywhere anymore

Note: the behavior also happens if I click the x on the div prior to resetting the grid. Anytime the button is clicked, it appears the click/drag functionality stops working as well.

No errors in the console or anything that points to an obvious culprit (for me at least).

Screen Capture

2019-06-08_CSSGridGenerator_ResetIssue

Activity

SeanKilleen

SeanKilleen commented on Jun 8, 2019

@SeanKilleen
Author

Further investigation:

After building locally and looking at the Vue tools, it looks like once the reset button is clicked, I don't see anything else happening in Vuex; no more addChildren calls are made.

My theory so far (relatively new to Vue) is that the call in store.js to state.childarea = []; is removing something that Vue is listening to by creating a new array rather than emptying the existing array.

SeanKilleen

SeanKilleen commented on Jun 8, 2019

@SeanKilleen
Author

OK, getting a little closer to the actual issue:

It looks like when I click & drag over any one portion of the grid, and then I either click the x on that particular box or click reset, the boxes are removed but the grid doesn't treat that area like it's draggable anymore. It's like the click & drag functionality still has the memory of that box somewhere.

wpbetterpages

wpbetterpages commented on Jul 18, 2019

@wpbetterpages

Hi,

I am facing the same issue. I don't understand vue one bit but can say that when I click on "What does this project do" link it sometimes works properly, otherwise the click and drag gets blocked. I wonder why that is.

Refreshing the page does work so maybe on clicking reset we could do refresh the page and then use this?

Any thoughts from developer or someone else?

Regards,

sdras

sdras commented on Oct 6, 2019

@sdras
Owner

Interesting, sorry about that. Definitely a bug. I'm swamped for the next few months but I will look into this as soon as I can. Open to PRs as well.

added
bugSomething isn't working
on Oct 6, 2019
SeanKilleen

SeanKilleen commented on Oct 6, 2019

@SeanKilleen
Author

No need to be sorry! :) I'll see if I can PR it; it is Hacktoberfest after all..

linked a pull request that will close this issue on Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @SeanKilleen@sdras@wpbetterpages

      Issue actions

        Clicking "Reset Grid" appears to disable the click & drag motion · Issue #56 · sdras/cssgridgenerator