{"action":"created","issue":{"url":"https://api.github.com/repos/artf/grapesjs/issues/1369","repository_url":"https://api.github.com/repos/artf/grapesjs","labels_url":"https://api.github.com/repos/artf/grapesjs/issues/1369/labels{/name}","comments_url":"https://api.github.com/repos/artf/grapesjs/issues/1369/comments","events_url":"https://api.github.com/repos/artf/grapesjs/issues/1369/events","html_url":"https://github.com/artf/grapesjs/issues/1369","id":351248582,"node_id":"MDU6SXNzdWUzNTEyNDg1ODI=","number":1369,"title":"[BUG] Class of a block doesn't always show in the classes section","user":{"login":"alimajed93","id":28840780,"node_id":"MDQ6VXNlcjI4ODQwNzgw","avatar_url":"https://avatars1.githubusercontent.com/u/28840780?v=4","gravatar_id":"","url":"https://api.github.com/users/alimajed93","html_url":"https://github.com/alimajed93","followers_url":"https://api.github.com/users/alimajed93/followers","following_url":"https://api.github.com/users/alimajed93/following{/other_user}","gists_url":"https://api.github.com/users/alimajed93/gists{/gist_id}","starred_url":"https://api.github.com/users/alimajed93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimajed93/subscriptions","organizations_url":"https://api.github.com/users/alimajed93/orgs","repos_url":"https://api.github.com/users/alimajed93/repos","events_url":"https://api.github.com/users/alimajed93/events{/privacy}","received_events_url":"https://api.github.com/users/alimajed93/received_events","type":"User","site_admin":false},"labels":[{"id":659487695,"node_id":"MDU6TGFiZWw2NTk0ODc2OTU=","url":"https://api.github.com/repos/artf/grapesjs/labels/can't%20reproduce","name":"can't reproduce","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-16T15:11:09Z","updated_at":"2018-08-23T20:34:40Z","closed_at":null,"author_association":"NONE","body":"Hello everyone,\r\n\r\nI have added many custom blocks and gave the same css class to all the images in those blocks. Let's call it for now 'image-class'. When I drag and drop 2 of those blocks and select 1 image in 1 of the blocks, the class 'image-class' does not show at first click in the classes section in the panel on the right. It only appears when the user clicks on a second image.\r\n\r\nYou can see in the image below, if the user drags and drops a 'Grid Items' block, and selects 1 image, the class 'grid-item-image' can be seen in the classes section in the panel (top right)\r\n<img width=\"1277\" alt=\"screen shot 2018-08-16 at 6 00 49 pm\" src=\"https://user-images.githubusercontent.com/28840780/44217144-745d7300-a17f-11e8-9e0d-ffa35d17244f.png\">\r\nThat is the behavior I am trying to describe.\r\n\r\nThe fact that the class doesn't always appear at first image selection is causing me a problem, because if the user modifies the padding per example, he will be modifying the padding of the whole class, so all the images will be effected, which is confusing for the user, because the class 'image-class' is not there to uncheck it and modify only the selected image and not all the blocks with the class 'image-class'."},"comment":{"url":"https://api.github.com/repos/artf/grapesjs/issues/comments/415562204","html_url":"https://github.com/artf/grapesjs/issues/1369#issuecomment-415562204","issue_url":"https://api.github.com/repos/artf/grapesjs/issues/1369","id":415562204,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTU2MjIwNA==","user":{"login":"artf","id":11614725,"node_id":"MDQ6VXNlcjExNjE0NzI1","avatar_url":"https://avatars0.githubusercontent.com/u/11614725?v=4","gravatar_id":"","url":"https://api.github.com/users/artf","html_url":"https://github.com/artf","followers_url":"https://api.github.com/users/artf/followers","following_url":"https://api.github.com/users/artf/following{/other_user}","gists_url":"https://api.github.com/users/artf/gists{/gist_id}","starred_url":"https://api.github.com/users/artf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artf/subscriptions","organizations_url":"https://api.github.com/users/artf/orgs","repos_url":"https://api.github.com/users/artf/repos","events_url":"https://api.github.com/users/artf/events{/privacy}","received_events_url":"https://api.github.com/users/artf/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T20:34:40Z","updated_at":"2018-08-23T20:34:40Z","author_association":"OWNER","body":"I understand what is your problem but still, you have to post a live demo because I can't reproduce it. It might depends on many stuff, just screenshots are not enough. I'm not even sure you're using the latest version, so update it please...\r\n\r\n> Another question is how can I add another things like this? so let's say I want to add under the 'selected' something like tagname, to show the tagname of the selected component; In another words, I want that on each time the user clicks on a block, to see the tagname of it under the classes and the id. Is there a way to implement this?\r\n\r\nYou can rely on this:\r\n```js\r\neditor.on('component:selected', component => {\r\n\tsomeSelectedEl.innerHTML = component.get('tagName');\r\n\t...\r\n})\r\n```"}}
{"actor":{"display_login":"artf"}}