IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
284 stars 110 forks source link

Draw Tools Options / color selector #381

Closed MysticJay closed 3 years ago

MysticJay commented 4 years ago

What is causing this broken style for the palette? grafik

0,30.1 (release) with DT 0.7.1 does not show this. 0.30.1 (release) with DT 0.8.0 does not show this 0.30.1.20200720.132610 [test] with DT 0.8.0 shows problem

McBen commented 4 years ago

tracked it down to: 0c90913bb863597c4b4f66ff37c0fe182120a493 - external: update jQuery to 3.5.1

PR: https://github.com/IITC-CE/ingress-intel-total-conversion/pull/369

McBen commented 4 years ago

But the full truth is: It's a bug in spectrum: https://github.com/bgrins/spectrum/issues/563

a missing </span> in plugins/external/spectrum.js#143 should be: html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span></span>');

johnd0e commented 4 years ago

Quickfix:

var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;
jQuery.htmlPrefilter = function( html ) {
    return html.replace( rxhtmlTag, "<$1></$2>" );
};
johnd0e commented 4 years ago

a missing </span> in plugins/external/spectrum.js#143

True. And that is already fixed in upstream, so we need just upgrade spectrum to latest.

MysticJay commented 4 years ago

Confirming issue solved. still this is a workaround and night need to be reverted. grafik

MysticJay commented 3 years ago

Solution accepted. upgrade provided with PR#382