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

Color Picker field causes Javascript error #1392

Closed
ghost opened this issue Feb 17, 2017 · 0 comments
Closed

Color Picker field causes Javascript error #1392

ghost opened this issue Feb 17, 2017 · 0 comments
Assignees
Labels
bug severity:normal Bugs that affect typical usage

Comments

@ghost
Copy link

ghost commented Feb 17, 2017

Description

Adding a Color field type to an entry/section causes a javascript error to occur. This can interfere with other Javascript based functionality causes it to cease working.

The error generated is Uncaught TypeError: Craft.ColorPicker is not a constructor

It is traced back to this code being generated in the template <script type="text/javascript">new Craft.ColorPicker('fields-backgroundColor');</script>

Steps to reproduce

  1. Create a field with type Color
  2. Attach it to a section
  3. Try to edit the section
  4. View the web developer console to see the javascript error being thrown.

Additional info

  • Craft version: Craft CMS 3.0.0-beta.3
  • PHP version: 7.0.13
  • Database driver & version:
  • Plugins & versions:
@angrybrad angrybrad added bug severity:normal Bugs that affect typical usage labels Feb 17, 2017
@brandonkelly brandonkelly self-assigned this Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug severity:normal Bugs that affect typical usage
Projects
None yet
Development

No branches or pull requests

2 participants