<commit_before><template>
	<span :class="colspanClass">
		<button v-el:btn :type="type" id="id" :class="classes" :style="style" :disabled="isDisabled">
			{{ caption }}
			<slot></slot>
		</button>
	</span>
</template>

<script>
	
	var utils = require('./utils.js');
	
	module.exports = {
		name: 'b-button',
		mixins: [require('./mixin-colspan.js'), require('./mixin-button.js')],
		props: {
			enabled: {
				default: true
			},
			style: {},
			tooltip: {
				type: String
			}
		},
		computed: {
			isDisabled: function() {
				return !utils.isTrue(this.enabled);
			},
		},
		attached: function() {
			if (this.tooltip) {
				$(this.$els.btn).tooltip({
					title: this.tooltip
				});
			}
		}
	};

</script><commit_msg>b-button: fix for event propagation<commit_after><template>
	<span :class="colspanClass" @click.capture="onClick($event)">
		<button v-el:btn :type="type" id="id" :class="classes" :style="style" :disabled="isDisabled">
			{{ caption }}
			<slot></slot>
		</button>
	</span>
</template>

<script>
	
	var utils = require('./utils.js');
	
	module.exports = {
		name: 'b-button',
		mixins: [require('./mixin-colspan.js'), require('./mixin-button.js')],
		props: {
			enabled: {
				default: true
			},
			style: {},
			tooltip: {
				type: String
			}
		},
		computed: {
			isDisabled: function() {
				return !utils.isTrue(this.enabled);
			},
		},
		methods: {
			onClick: function(e) {
				if (this.isDisabled) {
					e.preventDefault();
					e.stopPropagation();
				}
			}
		},
		attached: function() {
			if (this.tooltip) {
				$(this.$els.btn).tooltip({
					title: this.tooltip,
					placement: 'bottom'
				});
			}
		}
	};

</script>
{'fraction_non_alphanumeric': 0.2064825930372149, 'fraction_numerical': 0.0, 'mean_word_length': 2.940898345153664, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '595062', 'n_tokens_mistral': 737, 'n_tokens_neox': 602, 'n_words': 105}