mirror of https://github.com/adamdruppe/arsd.git
Feature: Readonly support to editable text widgets
This commit is contained in:
parent
a487424f1d
commit
4bc013e3dd
|
@ -12214,6 +12214,8 @@ class TextDisplayHelper : Widget {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addEventListener((scope CharEvent ce) {
|
this.addEventListener((scope CharEvent ce) {
|
||||||
|
if(readonly)
|
||||||
|
return;
|
||||||
if(ce.character < 32 && ce.character != '\t' && ce.character != '\n' && ce.character != '\b')
|
if(ce.character < 32 && ce.character != '\t' && ce.character != '\n' && ce.character != '\b')
|
||||||
return; // skip the ctrl+x characters we don't care about as plain text
|
return; // skip the ctrl+x characters we don't care about as plain text
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue