You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@tiptap/core

Package Overview
Dependencies
Maintainers
6
Versions
469
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/core - npm Package Compare versions

Comparing version
3.15.2
to
3.15.3
+11
src/utilities/isSafari.ts
/**
* Detects if the current browser is Safari (but not iOS Safari or Chrome).
* @returns `true` if the browser is Safari, `false` otherwise.
* @example
* if (isSafari()) {
* // Safari-specific handling
* }
*/
export function isSafari(): boolean {
return typeof navigator !== 'undefined' ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : false
}
+3
-3
{
"name": "@tiptap/core",
"description": "headless rich text editor",
"version": "3.15.2",
"version": "3.15.3",
"homepage": "https://tiptap.dev",

@@ -55,6 +55,6 @@ "keywords": [

"devDependencies": {
"@tiptap/pm": "^3.15.2"
"@tiptap/pm": "^3.15.3"
},
"peerDependencies": {
"@tiptap/pm": "^3.15.2"
"@tiptap/pm": "^3.15.3"
},

@@ -61,0 +61,0 @@ "repository": {

@@ -6,2 +6,3 @@ import { isTextSelection } from '../helpers/isTextSelection.js'

import { isiOS } from '../utilities/isiOS.js'
import { isSafari } from '../utilities/isSafari.js'

@@ -51,2 +52,10 @@ declare module '@tiptap/core' {

// Safari requires preventScroll to avoid the browser scrolling to the
// top of the editor when focus is called before the selection is set.
// We exclude iOS and Android since they are already handled above.
// see: https://github.com/ueberdosis/tiptap/issues/7318
if (isSafari() && !isiOS() && !isAndroid()) {
;(view.dom as HTMLElement).focus({ preventScroll: true })
}
// For React we have to focus asynchronously. Otherwise wild things happen.

@@ -53,0 +62,0 @@ // see: https://github.com/ueberdosis/tiptap/issues/1520

@@ -17,2 +17,3 @@ export * from './callOrReturn.js'

export * from './isRegExp.js'
export * from './isSafari.js'
export * from './isString.js'

@@ -19,0 +20,0 @@ export * from './markdown/index.js'

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display