[FEATURE REQUEST][BUG] Slider doesn't work with a non-integer step value
Question
Default StyleManager property "slider" doesn't work with a non-integer step value. GrapesJS version: 0.16.1
In many cases, it’s convenient to use a slider with a non-integer step value:

seems that Grapesjs supports only integer and rounds non-integer values.
Steps to reproduce: Add a property with type 'slider'
var property = styleManager.addProperty('mySector',{
name: 'Opacity',
type: 'slider',
property: 'opacity',
defaults: 1,
step: 0.1,
max: 1,
min: 0,
}, { at: 0 });
Answers (3)
Ah, you mean the arrows - sorry, thought you meant in general that the slider doesn't work.

Never noticed that - always use the slider order the mouse dragging over the arrows.
I'll have a look at the view - not too sure where to start haha.
Oddly enough - this works for me (I know I'm creating the sector at the same time):
editor.StyleManager.addSector('General',{
name: 'Extras',
open: false,
properties: [{
property: 'opacity',
type: 'slider',
defaults: 1,
step: 0.01,
max: 1,
min: 0
}]
}, { at: 9 });
Can you make a demo?
Yes of course. I've created a sample with your snippet, but seems that it doesn't want to work with me.
https://codepen.io/sjul66/pen/VwvMwNY
Thanks!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2044
Npm start to develop on local server didn't work
Did the procedure to start the local server using dev branch as described on README, it worked on the console, but fails on chrome and the...
Issue #1328
[Question/bug] Reordering components in the canvas
I've noticed some inconsistencies when moving DOM components around in the canvas. Description in the gif below using the Webpage Demo: In...
Issue #3267
BUG: Cannot set 0px box shadow blur
For some reason, the editor does not allow to set the blur to 0px. 0 always magically turns into 5px. <img width="243" alt="Screenshot 2021...
Issue #2148
[QUESTION] IE11 (Unable to get property 'style' of undefined)
Hi! Just faced the same issue: https://github.com/artf/grapesjs/issues/1295#issuecomment-410046832 While click on one of this buttons this....
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.