jQuery UI Widgets Forums Editors Button, RepeatButton, ToggleButton, LinkButton Button with imgSrc and bind click needs to trigger

This topic contains 2 replies, has 2 voices, and was last updated by  Hristo 3 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • CaptainBli
    Participant

    In the following code, the button does not trigger the click event. If I remove the imgSrc from the jqxButton object then the click event does trigger.

    <style>
    .addButton, .remButton, .bothButton {
    	width: 26px !important;
    	height: 26px !important;
    	font-size: 10px !important;
    	vertical-align: central !important;
    	padding-bottom: 6px !important;
    }
    </style>
    <script>
    function viewModel() {
       this.serial = ko.observable(0);
       this.addItem = function() {
          console.log("Here");
       }
    }
    </script>
    
    <div id="fred">
    <button id="cpmAdd" class=".addButton" data-bind="click: addModel, jqxButton: { template: 'success', imgSrc:'/images/IconPlus.png', imgPosition: 'center' }"></button> 
    </div>
    
    <script>
    	viewModel= new viewModel();
    	ko.applyBindings(viewModel, document.getElementById("fred"));
    </script>
    

    CaptainBli
    Participant

    Note that even in the demo in jqxknockout/combobox.htm simply add in an image to the add button makes the button stop working.

    <button id="addButton" data-bind="jqxButton: { imgSrc:'../../images/add.png'}" type="submit"></button>

    or the remove button:

           <button id="removeButton" data-bind="click: removeItem, jqxButton: {imgSrc:'../../images/add.png'}">
                    Remove</button>

    The trigger starts working again as soon as you remove the imgSrc.


    Hristo
    Participant

    Hello CaptainBli,

    Thank you for this feedback. I will create a work item for this case.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.