<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ashish Khokhariya</title>
    <description>The latest articles on Forem by Ashish Khokhariya (@khokhariya30oct).</description>
    <link>https://forem.com/khokhariya30oct</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3728124%2Fd864e414-fb15-4bf1-881d-902565e77999.jpeg</url>
      <title>Forem: Ashish Khokhariya</title>
      <link>https://forem.com/khokhariya30oct</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/khokhariya30oct"/>
    <language>en</language>
    <item>
      <title>BPMN-js 6.x Context Pad Not Working in Chrome 144 – Root Cause &amp; Practical Fix</title>
      <dc:creator>Ashish Khokhariya</dc:creator>
      <pubDate>Fri, 23 Jan 2026 10:01:12 +0000</pubDate>
      <link>https://forem.com/khokhariya30oct/bpmn-js-6x-context-pad-not-working-in-chrome-144-root-cause-practical-fix-57hp</link>
      <guid>https://forem.com/khokhariya30oct/bpmn-js-6x-context-pad-not-working-in-chrome-144-root-cause-practical-fix-57hp</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;If you're using &lt;strong&gt;bpmn-js 6.x&lt;/strong&gt; with &lt;strong&gt;Chrome 144&lt;/strong&gt;, clicking on BPMN states no longer opens the &lt;strong&gt;context pad&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
The click is incorrectly detected as a &lt;strong&gt;background click&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This post explains &lt;strong&gt;why it happens&lt;/strong&gt; and shares a &lt;strong&gt;production-safe workaround&lt;/strong&gt; using hover events.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem Statement
&lt;/h2&gt;

&lt;p&gt;While working with &lt;strong&gt;bpmn-js 6.x&lt;/strong&gt;, I noticed a strange issue after upgrading to &lt;strong&gt;Chrome 144&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clicking a BPMN element (task/state)
&lt;/li&gt;
&lt;li&gt;Context pad does NOT open
&lt;/li&gt;
&lt;li&gt;BPMN thinks the background was clicked
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;element.click&lt;/code&gt; becomes unreliable
&lt;/li&gt;
&lt;li&gt;Hover events still work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes the editor almost unusable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Root Cause (What’s Really Happening)
&lt;/h2&gt;

&lt;p&gt;This is a &lt;strong&gt;version incompatibility issue&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;bpmn-js 6.x&lt;/strong&gt; relies on older DOM / event handling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chrome 144&lt;/strong&gt; changed internal click resolution behavior&lt;/li&gt;
&lt;li&gt;Result:

&lt;ul&gt;
&lt;li&gt;Click event bubbles as &lt;strong&gt;canvas/background click&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;BPMN does not detect the actual element&lt;/li&gt;
&lt;li&gt;Context pad never opens&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Strangely:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;hover&lt;/code&gt; events still fire correctly&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mouseup&lt;/code&gt; events are partially detectable&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Strategy to Fix It
&lt;/h2&gt;

&lt;p&gt;Since &lt;strong&gt;click detection is broken&lt;/strong&gt;, the workaround is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detect &lt;strong&gt;hovered element&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Track last hovered BPMN state&lt;/li&gt;
&lt;li&gt;On mouse up:

&lt;ul&gt;
&lt;li&gt;If BPMN thinks background was clicked&lt;/li&gt;
&lt;li&gt;Force open context pad on last hovered element&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This avoids patching BPMN internals and is &lt;strong&gt;safe for production&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Working Fix (Chrome 144 + bpmn-js 6.x)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
js
// Fix for context pad not showing on click in Chrome 144 with bpmn-js 6.x

this.on('import.done', () =&amp;gt; {
  try {
    const eventBus = this.get('eventBus');
    const contextPad = this.get('contextPad');
    const selection = this.get('selection');

    let lastHoveredElement = null;

    // Track hovered BPMN element
    eventBus.on('element.hover', (event) =&amp;gt; {
      if (event.element.type !== 'bpmn:Process') {
        lastHoveredElement = event.element;
      }
    });

    // Clear hover when mouse leaves
    eventBus.on('element.out', (event) =&amp;gt; {
      if (event.element === lastHoveredElement) {
        lastHoveredElement = null;
      }
    });

    // Handle mouseup fallback
    eventBus.on('element.mouseup', (event) =&amp;gt; {
      // Chrome 144 bug: BPMN thinks background was clicked
      if (event.element?.type === 'bpmn:Process' &amp;amp;&amp;amp; lastHoveredElement) {
        try {
          selection.select(lastHoveredElement);
        } catch (e) {
          console.error('Selection error', e);
        }
        contextPad.open(lastHoveredElement);
        return;
      }

      // Normal behavior
      if (event.element?.type !== 'bpmn:Process') {
        contextPad.open(event.element);
      }
    });

  } catch (e) {
    console.error('Context pad workaround init failed', e);
  }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>bpmn</category>
      <category>chrome</category>
      <category>javascript</category>
      <category>vue</category>
    </item>
  </channel>
</rss>
