mongol icon indicating copy to clipboard operation
mongol copied to clipboard

MongolTextField: cursor off-centered for empty text field when maxLines is null

Open suragch opened this issue 2 years ago • 1 comments

The MongolTextField is off center when empty and maxLines is null:

wrong cursor position

After adding content the size changes and the cursor seems to fix itself (though the padding appears to be too wide):

better

This is observable in the example app.

suragch avatar Feb 10 '23 04:02 suragch

This issue can be solved by setting minLines: 1

             MongolTextField(
                    style: const TextStyle(fontSize: 24),
                    controller: controller1,
                    maxLines: null,
                    minLines:1,
                    decoration: const InputDecoration(
                      border: OutlineInputBorder(),
                    ),
             )

This may be the reason that the MongolParagraph width is 0 when setting empty "". Paragraph seems to be width is not 0. but I'm not sure yet.

Satsrag avatar Dec 16 '23 16:12 Satsrag