New warning in Chrome via jQuery

A new warning appeared unexpectedly in Chromeโ€™s developer tools (possibly after an update) in a larger CSS + jQuery project, and I canโ€™t understand what the problem is:

The specified value is '!' does not match the required format. Format: '#rrggbb', where rr, gg, bb are two-digit hexadecimal numbers.

I checked everywhere and I do not use any! "when specifying colors.

I am using jQuery version 2.1.0.

+6
source share
1 answer

In my case, this warning is triggered by Spectrum.js , I tried to remove it from my project, and the error no longer occurs, then I think this is the case. Do you also use this library in your project?

These are relative issues: # 291 # 292

And that can fix it: replace "!" with "#ffffff" on line 75 of the .js spectrum

inputTypeColorSupport = (function() { var colorInput = $("<input type='color' value='#ffffff' />")[0]; return colorInput.type === "color" && colorInput.value !== "#ffffff"; })(), 
+6
source

Source: https://habr.com/ru/post/983689/


All Articles