Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom widget when using with InlineCustomWidget is causing custom widget partially clickable/hover. #1358

Open
vishal0768 opened this issue Nov 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@vishal0768
Copy link

vishal0768 commented Nov 12, 2024

Steps to Reproduce

HTML
<customTag inline='true'>name=test_name</customTag> some text here
`HtmlWidget` configuration
Widget _htmlWidget(String string) {
    return HtmlWidget(
      string,
      customStylesBuilder: (element) => _styleSheet(element),
      customWidgetBuilder: (element) => _widgetBuilder(element),
      onTapUrl: _onTapUrl,
    );
  }
 Widget? _widgetBuilder(dom.Element element) {
    switch (element.localName) {
      case 'customTag':
        return return InlineCustomWidget(child: InkWell(onTap: ()=>print('clicked'), child:Text('2'))); // this component is tappable and opens a dialog on tap of it using Inkwell inside.
    }
    return null;
  }
Testing on chrome browser

Expected results

it should allow to tap on custom component when using InlineCustomWidget no matter what is the size of the the custom widget, it should not block tappable area of it.

Actual results

it is not allowing to tap on half of the portion of the custom component when using InlineCustomWidget no matter what is the size of the the custom widget, it blocks half of its width when coming at the start of the sentence.

@vishal0768 vishal0768 added the bug Something isn't working label Nov 12, 2024
@daohoangson
Copy link
Owner

The expected results look reasonable. However, your issue description is missing the HTML. Also, can you provide a minimal version of component for testing?

@daohoangson daohoangson self-assigned this Nov 13, 2024
@vishal0768
Copy link
Author

@daohoangson thanks for your reply, I have edited the above template, please have a look and let me know if need more info.
I tried to keep it simple.

@vishal0768
Copy link
Author

@daohoangson Also with this custom widget builder, I am getting another issue when the HtmlWidget is wrapped with SelectionArea() widget which is shown in example of the package as well, but that makes it harder to select the text properly when you have custom widget inside the html and you start to drag horizontally.
this works fine when there is no custom widget is there in the html.

Let me know if need to raise another bug for this, but keeping it here for now because it seems related to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants