JavaScript Prevent backspace on polymer paper-input

I have a polymer input field like this:

<paper-input type="text" class="user-value" data-id="user-value" value="{{typingAns}}" focus maxlength="10" />

is it possible to block the backspace functionality on this input? Basically, if the user press backspace is it possible to keep typingAns the same? I tried to use onkeydown but it doesn't seem to work.

Thanks a lot.

Answer:1

I am working on a page where I need to have some similar trees (kind of) and leaves on them and have lots of them, as in like spanning across page width at page bottom. I was thinking of doing it 2 ...

I am working on a page where I need to have some similar trees (kind of) and leaves on them and have lots of them, as in like spanning across page width at page bottom. I was thinking of doing it 2 ...

  1. html create large text box
  2. html create large text

I have a survey web app at work to collect data from customers. I'm trying to convert a dozen different functions (one for each option) into one simple function. The "votes" are stored as ...

I have a survey web app at work to collect data from customers. I'm trying to convert a dozen different functions (one for each option) into one simple function. The "votes" are stored as ...

  1. passing value from html to python
  2. passing value from child to parent angular
  3. passing value from one input to another
  4. passing value from groovy script to request
  5. passing value from python flask to html
  6. passing value from child to parent react
  7. passing value from html to python django
  8. passing value from javascript to php
  9. passing value from controller to view
  10. passing value from adapter to fragment
  11. passing value from activity to fragment
  12. passing value from controller to view in mvc
  13. passing value from javascript to html
  14. passing value from flask to html
  15. passing value from child to parent vue
  16. passing value from javascript to jsp
  17. passing value from servlet to jsp
  18. passing value from js to html
  19. passing value from form2 to form1 c#
  20. passing value from one html to another

I have an unordered list called test <ul id='test'></ul> it is dynamically populated with data via ajax. Each item 'li' is a div containing 'p' paragraphs. Each paragraph contains some ...

I have an unordered list called test <ul id='test'></ul> it is dynamically populated with data via ajax. Each item 'li' is a div containing 'p' paragraphs. Each paragraph contains some ...

I am trying to port a program from python (using OpenCV) to javascript/html, which generates a video where pixel colour are determined by a random function of its coordinates and its frame number. I ...

I am trying to port a program from python (using OpenCV) to javascript/html, which generates a video where pixel colour are determined by a random function of its coordinates and its frame number. I ...