If you mix JS event listeners and React event listeners, you need
event.nativeEvent.stopImmediatePropagation()| <VirtualHost *:80> | |
| ServerName magento2.dev | |
| SetEnv MAGE_RUN_CODE "base" | |
| SetEnv MAGE_RUN_TYPE "website" | |
| DocumentRoot "/var/www/html/magento2.dev/pub" | |
| <Directory "/var/www/html/magento2.dev/pub"> | |
| AllowOverride All | |
| Order Allow,Deny |
| #!/bin/bash -e | |
| # Original credits to theodorosploumis | |
| # IMPORTANT. My webstorm installation exists on /opt/webstorm. | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root." | |
| exit 1 | |
| fi | |
| <?php | |
| if (!function_exists('isHMR')) { | |
| /** | |
| * Get whether HMR is active. | |
| * | |
| * @return bool | |
| */ | |
| function isHMR() | |
| { |
| #!/bin/bash -e | |
| # Original credits to theodorosploumis | |
| # IMPORTANT. My phpstom installation exists on /opt/phpstorm. | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root." | |
| exit 1 | |
| fi | |
| // Step 1. Create this class in the middleware folder (/app/Http/Middleware). | |
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class BeforeAutoTrimmer { |
| #!/bin/bash | |
| # Install dependencies | |
| # older ubuntus | |
| #apt-get install build-essential libsqlite3-dev ruby1.9.1-dev | |
| # xenial | |
| apt install build-essential libsqlite3-dev ruby-dev | |
| # Install the gem | |
| # gem install mime-types -v 2.6.2 (gem install mime-types --version "< 3" gem install --conservative mailcatcher) |
| // :: (String, String) => String | |
| const spawn = require('child_process').spawnSync; | |
| // :: String => [String] | |
| const getRules = raw => raw | |
| .split('\n') | |
| .map(line => line.trim()) | |
| .filter(line => !!line) | |
| .filter(line => line[0] !== '/' && line[0] !== '✖') | |
| .map(line => line.match(/[a-z-]+$/)[0]); |
| // Step 1. Create this class in the middleware folder. | |
| <?php namespace App\Http\Middleware; | |
| use Closure; | |
| class BeforeAutoTrimmer { | |
| /** | |
| * Handle an incoming request. |