react-string-replace icon indicating copy to clipboard operation
react-string-replace copied to clipboard

In safari browser onClick not clickable

Open deepak-shinde opened this issue 7 years ago • 4 comments

reactStringReplace(title, /#(\w+)/g, (match, i) => ( <a key={match + i} data-hash={match} onClick={this.onclick} >#{match} ))

deepak-shinde avatar Mar 18 '17 07:03 deepak-shinde

Can you elaborate on this? I'm not sure what bug you're seeing based on the description

iansinnott avatar Mar 18 '17 17:03 iansinnott

Inside reactStringReplace I used anchor tag( <a key={match + i} data-hash={match} onClick={this.onclick} >)but on safari onClick event not triggering. Working on other browser.

deepak-shinde avatar Mar 20 '17 03:03 deepak-shinde

Can you post the code? I don't see any anchor tags in the example in your first comment.

iansinnott avatar Mar 20 '17 04:03 iansinnott

This is nothing to do with this library, in safari any link lacking of href its not clickable, if your intention is to visit an internal or external page you don't need the onClick, if you want to use the link as a button you should use a button instead.

nahumzs avatar Oct 10 '20 23:10 nahumzs