Skip to content

Commit 17cf0f9

Browse files
Revert "Merge pull request #1332 from donnieberg/a11y-inlineEdit-fix"
Click to blur has not been accounted for and thus callbacks do not work correctly when using the mouse. This reverts commit 854bde7, reversing changes made to b7e2215. # Conflicts: # package-lock.json # package.json
1 parent c359e85 commit 17cf0f9

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

components/forms/input/inline.jsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ const defaultProps = {
102102
class InlineEdit extends React.Component {
103103
constructor (props) {
104104
super(props);
105-
106105
this.state = {
107106
isEditing: false,
108107
value: null,
@@ -123,13 +122,6 @@ class InlineEdit extends React.Component {
123122
}
124123
}
125124

126-
handleCloseBtnClick = () => {
127-
this.endEditMode();
128-
setTimeout(() => {
129-
this.editButtonRef.focus();
130-
}, 100);
131-
};
132-
133125
endEditMode = (option) => {
134126
if (this.willSave) {
135127
clearTimeout(this.willSave);
@@ -227,18 +219,15 @@ class InlineEdit extends React.Component {
227219
category="utility"
228220
name="close"
229221
position="right"
230-
onBlur={this.handleBlur}
231-
onClick={this.handleCloseBtnClick}
222+
onClick={this.endEditMode}
223+
tabIndex="-1"
232224
/>
233225
) : null
234226
}
235227
disabled={disabled}
236228
inlineEditTrigger={
237229
<Button
238230
assistiveText={assistiveText}
239-
buttonRef={(component) => {
240-
if (component) this.editButtonRef = component;
241-
}}
242231
className="slds-m-left_x-small"
243232
disabled={disabled}
244233
iconCategory="utility"
@@ -248,6 +237,7 @@ class InlineEdit extends React.Component {
248237
variant="icon"
249238
/>
250239
}
240+
onBlur={this.handleBlur}
251241
onChange={this.handleChange}
252242
onClick={!this.state.isEditing ? this.triggerEditMode : null}
253243
onKeyDown={this.handleKeyDown}

0 commit comments

Comments
 (0)