[HTML5] Filters are not correclty updated on text change


#21

Correct.

Please, test with htmlText too:

import openfl.display.Sprite;
import openfl.filters.GlowFilter;
import openfl.text.TextField;
import openfl.text.TextFormat;

class Main extends Sprite {
	
	public function new () {
		
		super ();
		
		//var format = new TextFormat ("_sans", 40, 0xFF0000);
		
		var textField = new TextField ();
		textField.width = 600;
		textField.htmlText = "<font face='_sans' size='40' color='#FFFF00'>Click<font color='#FF0000'> her</font>e please!</font>";
		/*format.color = 0x4D0404;
		textField.setTextFormat(format, 0, 5);
		format.color = 0xCE4400;
		textField.setTextFormat(format, 5, 9);
		format.color = 0x4D0404;
		textField.setTextFormat(format, 9, textField.length);
		textField.filters = [new GlowFilter(0xFFFF00, 1)];*/
		addChild (textField);
		
		stage.addEventListener ("click", function (_) {
			textField.htmlText = "Thank you!";
		});
	}
}

#22

Yup that works too. The fix is for text that contains multiple formats after a space, so I need to make sure that normal text after a space still works.


#23

I pushed it to dev. Hopefully it doesn’t break anything, but let me know if it does :slight_smile:


#24

Thanks, I’ll report any suspicious behavior :slight_smile:


#25

There’s another issues with <font color> tag for multiline texts: