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

Update responsive-control.md #288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abhishek-junghare
Copy link

Description:

The desktop_default was giving an empty input field in the editor without any default desktop value. The tablet_defaultand mobile_default were functioning properly, and with having respective default values as well.

Updating desktop_default to just default resolved the issue.

Test Example:

$this->add_responsive_control(
    'test_input',
    [
        'type' => \Elementor\Controls_Manager::SLIDER,
        'label' => esc_html__('Test Input', 'textdomain'),
        'size_units' => ['px', '%', 'em', 'rem', 'vw'],
        'range' => [
            'px' => [
                'min' => -25,
                'max' => 200,
                'step' => 25,
            ],
        ],
        'devices' => [ 'desktop', 'tablet', 'mobile' ],
        'desktop_default' => [
            'size' => 30,
            'unit' => 'px',
        ],
        'tablet_default' => [
            'size' => 20,
            'unit' => 'px',
        ],
        'mobile_default' => [
            'size' => 10,
            'unit' => 'px',
        ],
    ]
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant